multiversx-sdk-cli 9.8.1__tar.gz → 9.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/PKG-INFO +3 -4
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/accounts.py +3 -3
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli.py +3 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_dns.py +3 -3
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_wallet.py +7 -4
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/config.py +5 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/constants.py +1 -2
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/contracts.py +3 -3
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dns.py +5 -4
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/sign_verify.py +2 -2
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/transactions.py +1 -1
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/pyproject.toml +2 -2
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/.gitignore +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/LICENSE +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/README.md +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/.vscode/settings.json +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_accounts.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_config.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_contracts.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_data.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_delegation.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_deps.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_faucet.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_ledger.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_localnet.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_output.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_password.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_shared.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_transactions.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_validators.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/contract_verification.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cosign_transaction.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/delegation/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/delegation/staking_provider.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/install.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/modules.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/resolution.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependency_checker.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/docker.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/downloader.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/errors.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/guards.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/interfaces.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/config.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/ledger_app_handler.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/ledger_functions.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_default.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_general.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_networking.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_part.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_root.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_sharding.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_software.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/constants.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis_json.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis_smart_contracts_json.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/libraries.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/node.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/node_config_toml.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/nodes_setup_json.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/p2p_toml.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/seednode_p2pKey.pem +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_build_software.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_clean.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_config.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_new.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_prerequisites.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_start.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/wallets.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/myprocess.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/native_auth_client.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/constants.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/core.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/interfaces.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/migrations.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_base.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_rust.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/common.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/extracted_feature.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/folder_report.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/project_report.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/report.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/wasm_report.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/do_report.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/features.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/report_option.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/size.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/twiggy_paths_check.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/format/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/format/change_type.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/format/format_options.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/report_creator.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/shared.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/templates.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/simulation.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/utils.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ux.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/core.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/validators_file.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/version.py +0 -0
- {multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/workstation.py +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: multiversx-sdk-cli
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.9.0
|
|
4
4
|
Summary: MultiversX Smart Contracts Tools
|
|
5
5
|
Project-URL: Homepage, https://github.com/multiversx/mx-sdk-py-cli
|
|
6
6
|
Author: MultiversX
|
|
7
|
-
License
|
|
8
|
-
License-File: LICENSE
|
|
7
|
+
License: MIT
|
|
9
8
|
Classifier: Intended Audience :: Developers
|
|
10
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -13,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
13
12
|
Requires-Python: >=3.8
|
|
14
13
|
Requires-Dist: argcomplete==3.2.2
|
|
15
14
|
Requires-Dist: ledgercomm[hid]
|
|
16
|
-
Requires-Dist: multiversx-sdk==0.
|
|
15
|
+
Requires-Dist: multiversx-sdk==0.19.0
|
|
17
16
|
Requires-Dist: prettytable
|
|
18
17
|
Requires-Dist: requests-cache
|
|
19
18
|
Requires-Dist: requests<3.0.0,>=2.32.0
|
|
@@ -6,7 +6,7 @@ from multiversx_sdk import (Address, Message, MessageComputer,
|
|
|
6
6
|
TransactionComputer, UserSigner)
|
|
7
7
|
from multiversx_sdk.network_providers.accounts import AccountOnNetwork
|
|
8
8
|
|
|
9
|
-
from multiversx_sdk_cli.
|
|
9
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
10
10
|
from multiversx_sdk_cli.interfaces import IAccount, IAddress, ITransaction
|
|
11
11
|
from multiversx_sdk_cli.ledger.config import compare_versions
|
|
12
12
|
from multiversx_sdk_cli.ledger.ledger_app_handler import \
|
|
@@ -61,11 +61,11 @@ class Account(AccountBase):
|
|
|
61
61
|
if pem_file:
|
|
62
62
|
pem_path = Path(pem_file).expanduser().resolve()
|
|
63
63
|
self.signer = UserSigner.from_pem_file(pem_path, pem_index)
|
|
64
|
-
self.address = Address(self.signer.get_pubkey().buffer,
|
|
64
|
+
self.address = Address(self.signer.get_pubkey().buffer, get_address_hrp())
|
|
65
65
|
elif key_file and password:
|
|
66
66
|
key_file_path = Path(key_file).expanduser().resolve()
|
|
67
67
|
self.signer = UserSigner.from_wallet(key_file_path, password)
|
|
68
|
-
self.address = Address(self.signer.get_pubkey().buffer,
|
|
68
|
+
self.address = Address(self.signer.get_pubkey().buffer, get_address_hrp())
|
|
69
69
|
|
|
70
70
|
def sign_transaction(self, transaction: ITransaction) -> str:
|
|
71
71
|
assert self.signer is not None
|
|
@@ -6,6 +6,7 @@ from argparse import ArgumentParser
|
|
|
6
6
|
from typing import Any, List
|
|
7
7
|
|
|
8
8
|
import argcomplete
|
|
9
|
+
from multiversx_sdk import LibraryConfig
|
|
9
10
|
from rich.logging import RichHandler
|
|
10
11
|
|
|
11
12
|
import multiversx_sdk_cli.cli_accounts
|
|
@@ -53,6 +54,8 @@ def _do_main(cli_args: List[str]):
|
|
|
53
54
|
logging.basicConfig(level="INFO", format='%(name)s: %(message)s', handlers=[RichHandler(show_time=False, rich_tracebacks=True)])
|
|
54
55
|
|
|
55
56
|
verify_deprecated_entries_in_config_file()
|
|
57
|
+
default_hrp = config.get_address_hrp()
|
|
58
|
+
LibraryConfig.default_address_hrp = default_hrp
|
|
56
59
|
|
|
57
60
|
if not hasattr(args, "func"):
|
|
58
61
|
parser.print_help()
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from typing import Any, List
|
|
2
2
|
|
|
3
|
-
from multiversx_sdk import
|
|
3
|
+
from multiversx_sdk import ProxyNetworkProvider
|
|
4
4
|
from prettytable import PrettyTable
|
|
5
5
|
|
|
6
6
|
from multiversx_sdk_cli import cli_shared
|
|
7
7
|
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
8
|
-
from multiversx_sdk_cli.constants import
|
|
8
|
+
from multiversx_sdk_cli.constants import ADDRESS_ZERO_HEX
|
|
9
9
|
from multiversx_sdk_cli.dns import (compute_dns_address_for_shard_id,
|
|
10
10
|
dns_address_for_name, name_hash, register,
|
|
11
11
|
registration_cost, resolve, validate_name,
|
|
@@ -82,7 +82,7 @@ def dns_resolve(args: Any):
|
|
|
82
82
|
|
|
83
83
|
config = get_config_for_network_providers()
|
|
84
84
|
addr = resolve(args.name, ProxyNetworkProvider(url=args.proxy, config=config))
|
|
85
|
-
if addr.to_hex() !=
|
|
85
|
+
if addr.to_hex() != ADDRESS_ZERO_HEX:
|
|
86
86
|
print(addr.to_bech32())
|
|
87
87
|
|
|
88
88
|
|
|
@@ -10,7 +10,8 @@ from multiversx_sdk import (Address, Mnemonic, UserPEM, UserSecretKey,
|
|
|
10
10
|
from multiversx_sdk.core.address import get_shard_of_pubkey
|
|
11
11
|
|
|
12
12
|
from multiversx_sdk_cli import cli_shared, utils
|
|
13
|
-
from multiversx_sdk_cli.
|
|
13
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
14
|
+
from multiversx_sdk_cli.constants import NUMBER_OF_SHARDS
|
|
14
15
|
from multiversx_sdk_cli.errors import (BadUserInput, KnownError,
|
|
15
16
|
WalletGenerationError)
|
|
16
17
|
from multiversx_sdk_cli.sign_verify import SignedMessage, sign_message
|
|
@@ -54,7 +55,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
54
55
|
)
|
|
55
56
|
sub.add_argument("--format", choices=WALLET_FORMATS, help="the format of the generated wallet file (default: %(default)s)", default=None)
|
|
56
57
|
sub.add_argument("--outfile", help="the output path and base file name for the generated wallet files (default: %(default)s)", type=str)
|
|
57
|
-
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=
|
|
58
|
+
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=get_address_hrp())
|
|
58
59
|
sub.add_argument("--shard", type=int, help="the shard in which the address will be generated; (default: random)")
|
|
59
60
|
sub.set_defaults(func=wallet_new)
|
|
60
61
|
|
|
@@ -69,7 +70,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
69
70
|
sub.add_argument("--in-format", required=True, choices=WALLET_FORMATS, help="the format of the input file")
|
|
70
71
|
sub.add_argument("--out-format", required=True, choices=WALLET_FORMATS_AND_ADDRESSES, help="the format of the output file")
|
|
71
72
|
sub.add_argument("--address-index", help=f"the address index, if input format is {WALLET_FORMAT_RAW_MNEMONIC}, {WALLET_FORMAT_KEYSTORE_MNEMONIC} or {WALLET_FORMAT_PEM} (with multiple entries) and the output format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM}", type=int, default=0)
|
|
72
|
-
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when the output format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=
|
|
73
|
+
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when the output format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=get_address_hrp())
|
|
73
74
|
sub.set_defaults(func=convert_wallet)
|
|
74
75
|
|
|
75
76
|
sub = cli_shared.add_command_subparser(
|
|
@@ -82,6 +83,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
82
83
|
group = sub.add_mutually_exclusive_group(required=True)
|
|
83
84
|
group.add_argument("--encode", action="store_true", help="whether to encode")
|
|
84
85
|
group.add_argument("--decode", action="store_true", help="whether to decode")
|
|
86
|
+
sub.add_argument("--hrp", type=str, help="the human readable part; only used for encoding to bech32 (default: %(default)s)", default=get_address_hrp())
|
|
85
87
|
sub.set_defaults(func=do_bech32)
|
|
86
88
|
|
|
87
89
|
sub = cli_shared.add_command_subparser(
|
|
@@ -288,7 +290,8 @@ def do_bech32(args: Any):
|
|
|
288
290
|
value = args.value
|
|
289
291
|
|
|
290
292
|
if encode:
|
|
291
|
-
|
|
293
|
+
hrp = args.hrp
|
|
294
|
+
address = Address.new_from_hex(value, hrp)
|
|
292
295
|
result = address.to_bech32()
|
|
293
296
|
else:
|
|
294
297
|
address = Address.new_from_bech32(value)
|
|
@@ -60,6 +60,10 @@ def get_value(name: str) -> str:
|
|
|
60
60
|
return value
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
def get_address_hrp():
|
|
64
|
+
return get_value("default_address_hrp")
|
|
65
|
+
|
|
66
|
+
|
|
63
67
|
def set_value(name: str, value: Any):
|
|
64
68
|
_guard_valid_name(name)
|
|
65
69
|
data = read_file()
|
|
@@ -162,6 +166,7 @@ def get_defaults() -> Dict[str, Any]:
|
|
|
162
166
|
"dependencies.testwallets.urlTemplate.windows": "https://github.com/multiversx/mx-sdk-testwallets/archive/{TAG}.tar.gz",
|
|
163
167
|
"dependencies.wasm-opt.tag": "0.112.0",
|
|
164
168
|
"github_api_token": "",
|
|
169
|
+
"default_address_hrp": "erd"
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
|
|
@@ -9,7 +9,6 @@ ONE_YEAR_IN_SECONDS = 60 * 60 * 24 * 365
|
|
|
9
9
|
|
|
10
10
|
DEFAULT_TX_VERSION = 2
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
ADDRESS_ZERO_BECH32 = "erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu"
|
|
12
|
+
ADDRESS_ZERO_HEX = "0000000000000000000000000000000000000000000000000000000000000000"
|
|
14
13
|
|
|
15
14
|
NUMBER_OF_SHARDS = 3
|
|
@@ -11,7 +11,7 @@ from multiversx_sdk.abi import Abi
|
|
|
11
11
|
|
|
12
12
|
from multiversx_sdk_cli import errors
|
|
13
13
|
from multiversx_sdk_cli.accounts import Account
|
|
14
|
-
from multiversx_sdk_cli.
|
|
14
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
15
15
|
from multiversx_sdk_cli.interfaces import IAddress
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger("contracts")
|
|
@@ -211,7 +211,7 @@ class SmartContract:
|
|
|
211
211
|
args.append(self._hex_to_bytes(arg))
|
|
212
212
|
elif arg.isnumeric():
|
|
213
213
|
args.append(int(arg))
|
|
214
|
-
elif arg.startswith(
|
|
214
|
+
elif arg.startswith(get_address_hrp()):
|
|
215
215
|
args.append(Address.new_from_bech32(arg))
|
|
216
216
|
elif arg.lower() == FALSE_STR_LOWER:
|
|
217
217
|
args.append(False)
|
|
@@ -253,7 +253,7 @@ def _to_hex(arg: str):
|
|
|
253
253
|
|
|
254
254
|
if arg.isnumeric():
|
|
255
255
|
return _prepare_decimal(arg)
|
|
256
|
-
elif arg.startswith(
|
|
256
|
+
elif arg.startswith(get_address_hrp()):
|
|
257
257
|
addr = Address.from_bech32(arg)
|
|
258
258
|
return _prepare_hexadecimal(f"{HEX_PREFIX}{addr.hex()}")
|
|
259
259
|
elif arg.lower() == FALSE_STR_LOWER or arg.lower() == TRUE_STR_LOWER:
|
|
@@ -6,7 +6,8 @@ from multiversx_sdk.network_providers.network_config import NetworkConfig
|
|
|
6
6
|
|
|
7
7
|
from multiversx_sdk_cli import cli_shared, utils
|
|
8
8
|
from multiversx_sdk_cli.accounts import Account
|
|
9
|
-
from multiversx_sdk_cli.
|
|
9
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
10
|
+
from multiversx_sdk_cli.constants import ADDRESS_ZERO_HEX
|
|
10
11
|
from multiversx_sdk_cli.contracts import SmartContract
|
|
11
12
|
from multiversx_sdk_cli.transactions import (compute_relayed_v1_data,
|
|
12
13
|
do_prepare_transaction)
|
|
@@ -36,10 +37,10 @@ def resolve(name: str, proxy: INetworkProvider) -> Address:
|
|
|
36
37
|
)
|
|
37
38
|
|
|
38
39
|
if len(response) == 0:
|
|
39
|
-
return Address.
|
|
40
|
+
return Address.new_from_hex(ADDRESS_ZERO_HEX, get_address_hrp())
|
|
40
41
|
|
|
41
42
|
result = response[0].get("returnDataParts")[0]
|
|
42
|
-
return Address.
|
|
43
|
+
return Address.new_from_hex(result, get_address_hrp())
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
def validate_name(name: str, shard_id: int, proxy: INetworkProvider):
|
|
@@ -137,7 +138,7 @@ def compute_dns_address_for_shard_id(shard_id: int) -> Address:
|
|
|
137
138
|
deployer_pubkey_prefix = InitialDNSAddress[:len(InitialDNSAddress) - ShardIdentiferLen]
|
|
138
139
|
|
|
139
140
|
deployer_pubkey = deployer_pubkey_prefix + bytes([0, shard_id])
|
|
140
|
-
deployer = Account(address=Address(deployer_pubkey,
|
|
141
|
+
deployer = Account(address=Address(deployer_pubkey, get_address_hrp()))
|
|
141
142
|
deployer.nonce = 0
|
|
142
143
|
address_computer = AddressComputer(number_of_shards=3)
|
|
143
144
|
contract_address = address_computer.compute_contract_address(deployer.address, deployer.nonce)
|
|
@@ -23,7 +23,7 @@ class SignedMessage:
|
|
|
23
23
|
verifiable_message.signature = bytes.fromhex(self.signature)
|
|
24
24
|
message_computer = MessageComputer()
|
|
25
25
|
|
|
26
|
-
verifier = UserVerifier.from_address(Address.
|
|
26
|
+
verifier = UserVerifier.from_address(Address.new_from_bech32(self.address))
|
|
27
27
|
is_signed = verifier.verify(message_computer.compute_bytes_for_signing(verifiable_message), verifiable_message.signature)
|
|
28
28
|
return is_signed
|
|
29
29
|
|
|
@@ -37,4 +37,4 @@ class SignedMessage:
|
|
|
37
37
|
|
|
38
38
|
def sign_message(message: str, account: Account) -> SignedMessage:
|
|
39
39
|
signature = account.sign_message(message.encode())
|
|
40
|
-
return SignedMessage(account.address.
|
|
40
|
+
return SignedMessage(account.address.to_bech32(), message, signature)
|
|
@@ -136,7 +136,7 @@ def get_guardian_account_from_args(args: Any):
|
|
|
136
136
|
account = Account(key_file=args.guardian_keyfile, password=password)
|
|
137
137
|
elif args.guardian_ledger:
|
|
138
138
|
address = do_get_ledger_address(account_index=args.guardian_ledger_account_index, address_index=args.guardian_ledger_address_index)
|
|
139
|
-
account = Account(address=Address.
|
|
139
|
+
account = Account(address=Address.new_from_bech32(address))
|
|
140
140
|
else:
|
|
141
141
|
raise errors.NoWalletProvided()
|
|
142
142
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "multiversx-sdk-cli"
|
|
7
|
-
version = "9.
|
|
7
|
+
version = "9.9.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="MultiversX" },
|
|
10
10
|
]
|
|
@@ -28,7 +28,7 @@ dependencies = [
|
|
|
28
28
|
"requests-cache",
|
|
29
29
|
"rich==13.3.4",
|
|
30
30
|
"argcomplete==3.2.2",
|
|
31
|
-
"multiversx-sdk==0.
|
|
31
|
+
"multiversx-sdk==0.19.0"
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
[project.scripts]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/.vscode/settings.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_transactions.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/contract_verification.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cosign_transaction.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/delegation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/install.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/modules.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/resolution.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependency_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/ledger_functions.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_default.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_general.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_part.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_root.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_sharding.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_software.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/constants.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/libraries.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/p2p_toml.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_clean.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_config.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_new.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_start.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/wallets.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/native_auth_client.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/interfaces.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/migrations.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_base.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_rust.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/templates.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.1 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|