> For the complete documentation index, see [llms.txt](https://guide.mmdrza.com/guidelines/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.mmdrza.com/guidelines/cryptofuzz/example/decimal.md).

# Decimal

Cryptofuzz example Python script for Recovery and Hunting Crypto Wallet from Decimal

***

```python
import os

from cryptofuzz import Convertor, Generator

conv = Convertor()
gen = Generator()


# generate random number decimal
dec = gen.generate_decimal()
# decimal to mnemonic
mnemonic = conv.int_to_mnemonic(dec)
# Convert decimal To Hex
privatekey = conv.int_to_hex(dec)
# Convert decimal To WIF Compress
wif_compress = conv.int_to_wif(dec, True)
# Convert decimal To WIF Uncompress
wif_uncompress = conv.int_to_wif(dec, False)
# Convert Wif To Binary
binary_str = conv.int_to_binary(dec)
# Convert Wif To xprv
xprv = conv.int_to_xprv(dec)
# Convert Wif To xpub
xpub = conv.int_to_xpub(dec)
# Convert Wif To compress address
compress_address = conv.int_to_addr(dec, True)
# Convert Wif To uncompress address
uncompress_address = conv.int_to_addr(dec, False)
# Output
print('Private key', privatekey)
print('Mnemonic', mnemonic)
print('Compress address', compress_address)
print('Uncompress address', uncompress_address)
print('Wif', wif_compress)
print('WIF uncompress', wif_uncompress)
print('Dec', dec)
print('Binary', binary_str)
print('XPRV', xprv)
print('XPUB', xpub)
```

#### Generating Cryptocurrency Wallet Information with CryptoFuzz

In this Python script, we're utilizing the <mark style="color:yellow;">`CryptoFuzz`</mark> library, a powerful tool for generating and converting various cryptographic formats. This example demonstrates the generation of cryptocurrency wallet components from a randomly generated decimal number, showcasing the flexibility and utility of CryptoFuzz in handling cryptographic data.

**Key Components Generated:**

* **Private Key:** A crucial element for accessing and managing a cryptocurrency wallet, displayed here in hexadecimal format.
* **Mnemonic Phrase:** An easier-to-remember series of words generated from the decimal, used for recovering wallets.
* **Addresses:** Both compressed and uncompressed formats of the wallet's address are shown, serving as the public identifier for receiving funds.
* **Wallet Import Format (WIF):** Demonstrated in both compressed and uncompressed forms, this format is used for importing and exporting private keys across wallet software.
* **Binary Representation:** Showcases the binary format of the decimal, further emphasizing the versatility of conversion options available.
* **Extended Public and Private Keys (xpub/xprv):** These extended keys are crucial for generating wallet addresses in hierarchical deterministic (HD) wallets.

This script offers a comprehensive overview of how to leverage CryptoFuzz for generating and converting a wide range of cryptographic data, suitable for developing secure cryptocurrency wallets and applications.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guide.mmdrza.com/guidelines/cryptofuzz/example/decimal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
