diff --git a/README.md b/README.md index 3915311..91c5452 100644 --- a/README.md +++ b/README.md @@ -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" diff --git a/bip38/bip38.py b/bip38/bip38.py index ebae6a3..b24b245 100644 --- a/bip38/bip38.py +++ b/bip38/bip38.py @@ -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) @@ -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 @@ -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( @@ -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 @@ -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( diff --git a/bip38/const.py b/bip38/const.py index 92dc793..1e90ff3 100644 --- a/bip38/const.py +++ b/bip38/const.py @@ -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 @@ -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"] diff --git a/bip38/wif.py b/bip38/wif.py index 9874f84..83b8a06 100644 --- a/bip38/wif.py +++ b/bip38/wif.py @@ -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] @@ -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" diff --git a/desktop/ui/bip38.ui b/desktop/ui/bip38.ui index 09dbfbb..f43c9f9 100644 --- a/desktop/ui/bip38.ui +++ b/desktop/ui/bip38.ui @@ -740,7 +740,7 @@ - Wallet Important Format (WIF) + Wallet Import Format (WIF) diff --git a/desktop/ui/ui_bip38.py b/desktop/ui/ui_bip38.py index ba94004..4973e47 100644 --- a/desktop/ui/ui_bip38.py +++ b/desktop/ui/ui_bip38.py @@ -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)) diff --git a/docs/conf.py b/docs/conf.py index 36adf5c..4bd1371 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -85,7 +85,7 @@ # }, # "sidebar_hide_name": True, # "navigation_with_keys": True, - # "announcement": "Important announcement!", + # "announcement": "Import announcement!", } # Add any paths that contain custom static files (such as style sheets) here, diff --git a/docs/index.rst b/docs/index.rst index 280ee99..a76e743 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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" diff --git a/docs/wif.rst b/docs/wif.rst index b374351..a9d4d42 100644 --- a/docs/wif.rst +++ b/docs/wif.rst @@ -1,7 +1,7 @@ :orphan: ======================= -Wallet Important Format +Wallet Import Format ======================= .. automodule:: bip38.wif