Skip to content

Commit

Permalink
Fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
axiom90 committed Nov 1, 2024
1 parent 2a8b0bb commit 17b3f44
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ DETAIL: bool = True
bip38: BIP38 = BIP38(
cryptocurrency=Cryptocurrency, network=NETWORK
)
# Wallet Important Format's
# Wallet Import Format's
WIFs: List[str] = [
private_key_to_wif(
private_key=PRIVATE_KEY, cryptocurrency=Cryptocurrency, network=NETWORK, wif_type="wif"
Expand Down
10 changes: 5 additions & 5 deletions bip38/bip38.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def create_new_encrypted_wif(

factor_b: bytes = double_sha256(seed_b)
if not 0 < bytes_to_integer(factor_b) < N:
raise Error("Invalid EC encrypted WIF (Wallet Important Format)")
raise Error("Invalid EC encrypted WIF (Wallet Import Format)")

public_key: PublicKey = PublicKey.from_point(
PublicKey.from_bytes(pass_point).point() * bytes_to_integer(factor_b)
Expand Down Expand Up @@ -416,7 +416,7 @@ def confirm_code(
if lot_and_sequence:
pass_factor: bytes = double_sha256(pass_factor + owner_entropy)
if bytes_to_integer(pass_factor) == 0 or bytes_to_integer(pass_factor) >= N:
raise Error("Invalid EC encrypted WIF (Wallet Important Format)")
raise Error("Invalid EC encrypted WIF (Wallet Import Format)")

pass_point: bytes = PrivateKey.from_bytes(pass_factor).public_key().raw_compressed()
salt: bytes = address_hash + owner_entropy
Expand Down Expand Up @@ -544,7 +544,7 @@ def decrypt(
bytes_to_integer(decrypted_half_1 + decrypted_half_2) ^ bytes_to_integer(derived_half_1)
)
if bytes_to_integer(private_key) == 0 or bytes_to_integer(private_key) >= N:
raise Error("Invalid Non-EC encrypted WIF (Wallet Important Format)")
raise Error("Invalid Non-EC encrypted WIF (Wallet Import Format)")

public_key: PublicKey = PrivateKey.from_bytes(private_key).public_key()
address: str = P2PKHAddress.encode(
Expand Down Expand Up @@ -588,7 +588,7 @@ def decrypt(
if lot_and_sequence:
pass_factor: bytes = double_sha256(pass_factor + owner_entropy)
if bytes_to_integer(pass_factor) == 0 or bytes_to_integer(pass_factor) >= N:
raise Error("Invalid EC encrypted WIF (Wallet Important Format)")
raise Error("Invalid EC encrypted WIF (Wallet Import Format)")

pre_public_key: PublicKey = PrivateKey.from_bytes(pass_factor).public_key()
salt = address_hash + owner_entropy
Expand All @@ -610,7 +610,7 @@ def decrypt(

factor_b: bytes = double_sha256(seed_b)
if bytes_to_integer(factor_b) == 0 or bytes_to_integer(factor_b) >= N:
raise Error("Invalid EC encrypted WIF (Wallet Important Format)")
raise Error("Invalid EC encrypted WIF (Wallet Import Format)")

# multiply private key
private_key: bytes = integer_to_bytes(
Expand Down
4 changes: 2 additions & 2 deletions bip38/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# non-EC-multiplied & EC-multiplied private key prefixes
NO_EC_MULTIPLIED_PRIVATE_KEY_PREFIX: int = 0x0142
EC_MULTIPLIED_PRIVATE_KEY_PREFIX: int = 0x0143
# non-EC-multiplied Wallet Important Format (WIF) flags
# non-EC-multiplied Wallet Import Format (WIF) flags
NO_EC_MULTIPLIED_WIF_FLAG: int = 0xc0
NO_EC_MULTIPLIED_WIF_COMPRESSED_FLAG: int = 0xe0
# Magic bytes for lot and sequence and non lot and sequence
Expand Down Expand Up @@ -40,7 +40,7 @@
UNCOMPRESSED_PUBLIC_KEY_PREFIX: int = 0x04
# Checksum byte length
CHECKSUM_BYTE_LENGTH: int = 4
# Wallet Important Format (WIF) types
# Wallet Import Format (WIF) types
WIF_TYPES = ["wif", "wif-compressed"]
# Public Key types
PUBLIC_KEY_TYPES = ["uncompressed", "compressed"]
Expand Down
4 changes: 2 additions & 2 deletions bip38/wif.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def decode_wif(

raw: bytes = decode(wif)
if not raw.startswith(integer_to_bytes(wif_prefix)):
raise WIFError(f"Invalid Wallet Important Format (WIF)")
raise WIFError(f"Invalid Wallet Import Format (WIF)")

prefix_length: int = len(integer_to_bytes(wif_prefix))
prefix_got: bytes = raw[:prefix_length]
Expand All @@ -86,7 +86,7 @@ def decode_wif(
wif_type: str = "wif"

if len(private_key) not in [33, 32]:
raise WIFError(f"Invalid Wallet Important Format (WIF)")
raise WIFError(f"Invalid Wallet Import Format (WIF)")
elif len(private_key) == 33:
private_key = private_key[:-len(integer_to_bytes(COMPRESSED_PRIVATE_KEY_PREFIX))]
wif_type = "wif-compressed"
Expand Down
2 changes: 1 addition & 1 deletion desktop/ui/bip38.ui
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@
<item>
<widget class="QLabel" name="noECWIFQLabel">
<property name="text">
<string>Wallet Important Format (WIF)</string>
<string>Wallet Import Format (WIF)</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion desktop/ui/ui_bip38.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def retranslateUi(self, MainWindow):
self.noECWIFTypeQLabel.setText(QCoreApplication.translate("MainWindow", u"WIF Type", None))
self.noECWIFTypeQComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"(Select)", None))
self.noECPrivateKeyConvertQPushButton.setText(QCoreApplication.translate("MainWindow", u"Convert", None))
self.noECWIFQLabel.setText(QCoreApplication.translate("MainWindow", u"Wallet Important Format (WIF)", None))
self.noECWIFQLabel.setText(QCoreApplication.translate("MainWindow", u"Wallet Import Format (WIF)", None))
self.noECEncryptQPushButton.setText(QCoreApplication.translate("MainWindow", u"Encrypt", None))
self.ecOwnerSaltQLabel.setText(QCoreApplication.translate("MainWindow", u"Owner Salt", None))
self.ecOwnerSaltGenerateQPushButton.setText(QCoreApplication.translate("MainWindow", u"Generate", None))
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
# },
# "sidebar_hide_name": True,
# "navigation_with_keys": True,
# "announcement": "<em>Important</em> announcement!",
# "announcement": "<em>Import</em> announcement!",
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ _______________
bip38: BIP38 = BIP38(
cryptocurrency=Cryptocurrency, network=NETWORK
)
# Wallet Important Format's
# Wallet Import Format's
WIFs: List[str] = [
private_key_to_wif(
private_key=PRIVATE_KEY, cryptocurrency=Cryptocurrency, network=NETWORK, wif_type="wif"
Expand Down
2 changes: 1 addition & 1 deletion docs/wif.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:orphan:

=======================
Wallet Important Format
Wallet Import Format
=======================

.. automodule:: bip38.wif
Expand Down

0 comments on commit 17b3f44

Please sign in to comment.