Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .owshen-wallet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"entropy":{"value":[112,156,131,183,172,162,169,216,53,166,227,148,139,216,113,139]},"token_contracts":[]}
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Owshen is an innovative privacy platform developed for EVM-based blockchains. Ow
1. Get yourself a GNU/Linux machine. (Ubuntu +22.04 preferred)
2. Install `libfuse2`, `nodejs` and `snarkjs`:
```bash
sudo add-apt-repository universe
sudo apt install fuse libfuse2 nodejs -y
sudo npm install -g snarkjs
```
Expand Down Expand Up @@ -36,7 +37,13 @@ Owshen is an innovative privacy platform developed for EVM-based blockchains. Ow
```
./Owshen_v0.1.3_x86_64.AppImage wallet
```
7. If you have problems running the wallet, let's discuss in our Discord server: https://discord.gg/owshen
7. if you've forgotten to save your mnemonic but have the entropy file, you can convert your entropy to a mnemonic
```
cd convert
pip install -r requirements.txt
python convert_entropy_to_mnemonic.py --entropy-json /path/to/your/.owshen-wallet.json
```
8. If you have problems running the wallet, let's discuss in our Discord server: https://discord.gg/owshen


Happy diving! :swimmer:
44 changes: 44 additions & 0 deletions convert/convert_entropy_to_mnemonic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import argparse
import json
from mnemonic import Mnemonic

def entropy_to_mnemonic(entropy):
mnemonic = Mnemonic("english")
mnemonic_phrase = mnemonic.to_mnemonic(bytes(entropy))
return mnemonic_phrase

def main():
# Create an argument parser
parser = argparse.ArgumentParser(description="Convert entropy to mnemonic phrase")

# Add the --entropy-json argument
parser.add_argument("--entropy-json", required=True, help="Path to the JSON file containing entropy")

# Parse the command-line arguments
args = parser.parse_args()

# Read JSON data from file
try:
with open(args.entropy_json, "r") as file:
json_data = json.load(file)
except FileNotFoundError:
print(f"Error: File '{args.entropy_json}' not found.")
return
except json.JSONDecodeError:
print(f"Error: Invalid JSON format in file '{args.entropy_json}'.")
return

# Extract entropy from the JSON
entropy = json_data["entropy"]["value"]

# Convert the array of integers to a bytes object
entropy_bytes = bytes(entropy)

# Convert entropy to mnemonic
mnemonic_phrase = entropy_to_mnemonic(entropy_bytes)

# Print the mnemonic phrase
print("Mnemonic Phrase:", mnemonic_phrase)

if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions convert/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mnemonic==0.21