Skip to content

Commit

Permalink
update 07.09.2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Pymmdrza committed Sep 7, 2024
1 parent d5c4fbf commit 291ff0c
Show file tree
Hide file tree
Showing 3 changed files with 827 additions and 57 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,23 @@ sudo chmod +x install.sh

---

### Update `2024.09.07`:

Add Function for checking mnemonic standard type :

- `cryptofuzz.utils.is_mnemonic`

```python
from cryptofuzz import Convertor

cn = Convertor()
isValid = cn.is_mnemonic("abandon ... help abandon flower") # Mnemonic 12/18/24
```

### Update `2024.08.24`:

Add Short Key (Mini Private Key) Converter for bitcoin wallet. (Mini Private Key : [More Detail's](https://en.bitcoin.it/wiki/Mini_private_key_format))
Add Short Key (Mini Private Key) Converter for bitcoin wallet. (Mini Private
Key : [More Detail's](https://en.bitcoin.it/wiki/Mini_private_key_format))

Short Key Like: `S6c56bnXQiBjk9mqSYE7ykVQ7NzrRy`

Expand Down Expand Up @@ -246,14 +260,16 @@ read block data from block file (bitcoin core sync data file's) [ `blk00001.dat`
```python
from cryptofuzz import block
import os

# path block file
path_data = os.path.join("BITCOIN_CORE_SYNC_BLOCK_FOLDER")
block_path = os.path.join(path_data, "blk00001.dat") # first block file sync
block_path = os.path.join(path_data, "blk00001.dat") # first block file sync
# full block data
block_data = block.reader(block_path)
```

---

## Command-Line Usage

After installing the `cryptofuzz` package, you can use the `cryptofuzz` command-line tool to perform various
Expand Down
13 changes: 7 additions & 6 deletions cryptofuzz/Wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def PrivateKey_To_Mnemonic(hexed: str) -> str:
"""
seed = convertor.hex_to_bytes(hexed)
return convertor.bytes_to_mne(seed)
return convertor.bytes_to_mnemonic(seed)


# ----------------------------------------------------------
Expand Down Expand Up @@ -440,7 +440,7 @@ def Bytes_To_Mnemonic(seed: bytes) -> str:
"""
return convertor.bytes_to_mne(seed)
return convertor.bytes_to_mnemonic(seed)


# ----------------------------------------------------------
Expand Down Expand Up @@ -751,7 +751,7 @@ def Wif_To_PrivateKey(wif: str) -> str:

# ----------------------------------------------------------
def Wif_To_Mnemonic(wif: str) -> str:
return convertor.bytes_to_mne(convertor.wif_to_bytes(wif))
return convertor.bytes_to_mnemonic(convertor.wif_to_bytes(wif))


# ----------------------------------------------------------
Expand Down Expand Up @@ -818,7 +818,7 @@ def Decimal_To_Address(dec: int, compress: bool = False) -> str:
# ----------------------------------------------------------
def Decimal_To_Mnemonic(dec: int) -> str:
seed = convertor.int_to_bytes(dec)
return convertor.bytes_to_mne(seed)
return convertor.bytes_to_mnemonic(seed)


# ----------------------------------------------------------
Expand Down Expand Up @@ -866,7 +866,8 @@ def Binary_To_PrivateKey(binary_str: str) -> str: return convertor.bytes_to_hex(


# ----------------------------------------------------------
def Binary_To_Mnemonic(binary_str: str) -> str: return convertor.bytes_to_mne(convertor.binary_to_bytes(binary_str))
def Binary_To_Mnemonic(binary_str: str) -> str: return convertor.bytes_to_mnemonic(
convertor.binary_to_bytes(binary_str))


# ----------------------------------------------------------
Expand Down Expand Up @@ -910,7 +911,7 @@ def XPRV_To_Address(xprv: str, compress: bool = False) -> str: return convertor.
convertor.xprv_to_bytes(xprv), compress)


def XPRV_To_Mnemonic(xprv: str) -> str: return convertor.bytes_to_mne(convertor.xprv_to_bytes(xprv))
def XPRV_To_Mnemonic(xprv: str) -> str: return convertor.bytes_to_mnemonic(convertor.xprv_to_bytes(xprv))


def XPRV_To_XPUB(xprv: str) -> str: return convertor.bytes_to_xpub(convertor.xprv_to_bytes(xprv))
Expand Down
Loading

0 comments on commit 291ff0c

Please sign in to comment.