@@ -285,14 +285,14 @@ def encode_wif(private_key: Union[str, bytes]) -> Tuple[str, str]:
285
285
286
286
def private_key_to_wif (private_key : Union [str , bytes ], wif_type : Literal ["wif" , "wif-compressed" ] = "wif-compressed" ) -> str :
287
287
"""
288
- Private key to Wallet Important Fromat (WFI ) converter
288
+ Private key to Wallet Important Format (WIF ) converter
289
289
290
290
:param private_key: Private key
291
291
:type private_key: Union[str, bytes]
292
- :param wif_type: Wallet Important Fromat (WFI ) type, default to ``wif-compressed``
292
+ :param wif_type: Wallet Important Format (WIF ) type, default to ``wif-compressed``
293
293
:type wif_type: Literal["wif", "wif-compressed"]
294
294
295
- :returns: str -- Wallet Important Fromat
295
+ :returns: str -- Wallet Important Format
296
296
297
297
>>> from bip38 import private_key_to_wif
298
298
>>> private_key_to_wif(private_key="cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5")
@@ -339,9 +339,9 @@ def decode_wif(wif: str) -> Tuple[bytes, Literal["wif", "wif-compressed"], bytes
339
339
340
340
def wif_to_private_key (wif : str ) -> str :
341
341
"""
342
- Wallet Important Fromat (WFI ) to Private key converter
342
+ Wallet Important Format (WIF ) to Private key converter
343
343
344
- :param wif: Wallet Important Fromat
344
+ :param wif: Wallet Important Format
345
345
:type wif: str
346
346
347
347
:returns: str -- Private key
@@ -358,12 +358,12 @@ def wif_to_private_key(wif: str) -> str:
358
358
359
359
def get_wif_type (wif : str ) -> Literal ["wif" , "wif-compressed" ]:
360
360
"""
361
- Get Wallet Important Fromat (WFI ) type
361
+ Get Wallet Important Format (WIF ) type
362
362
363
- :param wif: Wallet Important Fromat
363
+ :param wif: Wallet Important Format
364
364
:type wif: str
365
365
366
- :returns: Literal["wif", "wif-compressed"] -- WFI type
366
+ :returns: Literal["wif", "wif-compressed"] -- WIF type
367
367
368
368
>>> from bip38 import get_wif_type
369
369
>>> get_wif_type(wif="L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP")
@@ -377,12 +377,12 @@ def get_wif_type(wif: str) -> Literal["wif", "wif-compressed"]:
377
377
378
378
def get_wif_checksum (wif : str ) -> str :
379
379
"""
380
- Get Wallet Important Fromat (WFI ) checksum
380
+ Get Wallet Important Format (WIF ) checksum
381
381
382
- :param wif: Wallet Important Fromat
382
+ :param wif: Wallet Important Format
383
383
:type wif: str
384
384
385
- :returns: str -- WFI checksum
385
+ :returns: str -- WIF checksum
386
386
387
387
>>> from bip38 import get_wif_checksum
388
388
>>> get_wif_checksum(wif="L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP")
@@ -406,10 +406,14 @@ def public_key_to_addresses(public_key: Union[str, bytes], network: Literal["mai
406
406
:returns: str -- Address
407
407
408
408
>>> from bip38 import public_key_to_addresses
409
- >>> public_key_to_addresses(public_key="02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e")
409
+ >>> public_key_to_addresses(public_key="02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", network="mainnet" )
410
410
'164MQi977u9GUteHr4EPH27VkkdxmfCvGW'
411
- >>> public_key_to_addresses(public_key="04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4")
411
+ >>> public_key_to_addresses(public_key="04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", network="mainnet" )
412
412
'1Jq6MksXQVWzrznvZzxkV6oY57oWXD9TXB'
413
+ >>> public_key_to_addresses(public_key="02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", network="testnet")
414
+ 'mkaJhmE5vvaXG17uZdCm6wKpckEfnG4yt9'
415
+ >>> public_key_to_addresses(public_key="04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", network="testnet")
416
+ 'myM3eoxWDWxFe7GYHZw8K21rw7QDNZeDYM'
413
417
"""
414
418
415
419
if network not in ["mainnet" , "testnet" ]:
@@ -652,7 +656,7 @@ def confirm_code(
652
656
:type confirmation_code: str
653
657
:param network: Network type
654
658
:type network: Literal["mainnet", "testnet"], default to ``mainnet``
655
- :param detail: To show in deatil , default to ``False``
659
+ :param detail: To show in detail , default to ``False``
656
660
:type detail: bool
657
661
658
662
:returns: Union[str, dict] -- Confirmation of address info's
@@ -751,7 +755,7 @@ def bip38_decrypt(
751
755
:type passphrase: str
752
756
:param network: Network type
753
757
:type network: Literal["mainnet", "testnet"], default to ``mainnet``
754
- :param detail: To show in deatil , default to ``False``
758
+ :param detail: To show in detail , default to ``False``
755
759
:type detail: bool
756
760
757
761
:returns: Union[str, dict] -- WIF or All private Key info's
0 commit comments