Skip to content

Commit

Permalink
feat: keyring access & Monereo address generation (#926)
Browse files Browse the repository at this point in the history
Description
---
Revamp the way we handle keyring access and use it to store the monero
seed and the tari seed passphrase.

Motivation and Context
---
The user could deny access to the system Keychain, if they do we
wouldn't be able to successfully store needed credentials for the app.
Provide a wrapper to encapsulate storing the credentials in either the
system keychain, or fallback to file IO storage.

How Has This Been Tested?
---
Manually

What process can a PR reviewer use to test or verify this change?
---
Scenario 1:
- Install a slightly older version of TU. As of today (Friday 22nd, Nov)
this could be <=0.7.4.
- Assign a custom monero address / or leave the default monero address
- Then install the new version of the app
- Verify that your Monero address is your custom or the default monero
address
- Verify no monero seed words are present

Scenario 2:
- Perform a completely fresh install of this version of TU
- Verify the monero address is already a custom address
- Verify you have access to the monero seed words

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->

---------

Co-authored-by: Marcin Papież <[email protected]>
Co-authored-by: stringhandler <[email protected]>
Co-authored-by: shan <[email protected]>
Co-authored-by: Aaron Pepper <[email protected]>
Co-authored-by: Juan <[email protected]>
Co-authored-by: Juan De Luca <[email protected]>
Co-authored-by: stringhandler <[email protected]>
Co-authored-by: Misieq01 <[email protected]>
Co-authored-by: Shannon Tenner <[email protected]>
  • Loading branch information
10 people authored Nov 27, 2024
1 parent 78b2a94 commit a402071
Show file tree
Hide file tree
Showing 29 changed files with 658 additions and 168 deletions.
2 changes: 2 additions & 0 deletions public/locales/af/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "Hoë SVE-gebruik kan oorverhitting veroorsaak, energieverbruik verhoog, en kan oor tyd tot hardeware skade lei. Monitor asseblief gebruik om veilige en doeltreffende werking te verseker.",
"gpu-power-level": "GPU Krag %",
"gpu-warning": "Hoë GPU-gebruik kan oorverhitting veroorsaak, energieverbruik verhoog, en kan oor tyd tot hardeware skade lei. Monitor asseblief gebruik om veilige en doeltreffende werking te verseker.",
"save-changes": "Save Changes",
"saved": "Veranderinge Toepas",
"title": "Pasgemaakte Modus",
"warning": "Waarskuwing"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Voer Monero-adres in",
"title": "Monero-adres"
},
"monero-seed-words": "Monero Seed Words",
"network": "Netwerk",
"no-entry-guard": "Geen Toegangsbewaarder verbind nie!",
"not-connected-to-tari": "Nie aan die Tari Netwerk gekoppel nie",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/cn/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "高CPU使用率可能导致过热、增加能耗,并可能导致硬件损坏。请监控使用情况以确保安全高效的操作。",
"gpu-power-level": "GPU功率%",
"gpu-warning": "高GPU使用率可能导致过热、增加能耗,并可能导致硬件损坏。请监控使用情况以确保安全高效的操作。",
"save-changes": "Save Changes",
"saved": "应用更改",
"title": "自定义模式",
"warning": "警告"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "输入 Monero 地址",
"title": "Monero 地址"
},
"monero-seed-words": "Monero Seed Words",
"network": "网络",
"no-entry-guard": "未连接入口守卫!",
"not-connected-to-tari": "未连接到Tari网络",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/de/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "Hohe CPU-Nutzung kann Überhitzung verursachen, den Energieverbrauch erhöhen und im Laufe der Zeit zu Hardwareschäden führen. Bitte überwachen Sie die Nutzung, um einen sicheren und effizienten Betrieb zu gewährleisten.",
"gpu-power-level": "GPU-Leistung %",
"gpu-warning": "Hohe GPU-Nutzung kann Überhitzung verursachen, den Energieverbrauch erhöhen und im Laufe der Zeit zu Hardwareschäden führen. Bitte überwachen Sie die Nutzung, um einen sicheren und effizienten Betrieb zu gewährleisten.",
"save-changes": "Save Changes",
"saved": "Änderungen werden übernommen",
"title": "Benutzerdefinierter Modus",
"warning": "Warnung"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Gib die Monero-Adresse ein",
"title": "Monero-Adresse"
},
"monero-seed-words": "Monero Seed Words",
"network": "Netzwerk",
"no-entry-guard": "Kein Eingangswächter verbunden!",
"not-connected-to-tari": "Nicht mit dem Tari-Netzwerk verbunden",
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"placeholder": "Enter Monero address",
"title": "Monero address"
},
"monero-seed-words": "Monero Seed Words",
"network": "Network",
"no-entry-guard": "No Entry Guard connected!",
"not-connected-to-tari": "Not connected to the Tari Network",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/fr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "Une utilisation élevée du CPU peut provoquer une surchauffe, augmenter la consommation d\"énergie et peut entraîner des dommages matériels au fil du temps. Veuillez surveiller l\"utilisation pour assurer un fonctionnement sûr et efficace.",
"gpu-power-level": "Puissance GPU %",
"gpu-warning": "Une utilisation élevée du GPU peut provoquer une surchauffe, augmenter la consommation d\"énergie et peut entraîner des dommages matériels au fil du temps. Veuillez surveiller l\"utilisation pour assurer un fonctionnement sûr et efficace.",
"save-changes": "Save Changes",
"saved": "Application des modifications",
"title": "Mode personnalisé",
"warning": "Avertissement"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Entrez l\"adresse Monero",
"title": "Adresse Monero"
},
"monero-seed-words": "Monero Seed Words",
"network": "Réseau",
"no-entry-guard": "Aucun Entry Guard connecté !",
"not-connected-to-tari": "Non connecté au réseau Tari",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/hi/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "उच्च CPU उपयोग से ओवरहीटिंग हो सकती है, ऊर्जा खपत बढ़ सकती है, और समय के साथ हार्डवेयर को नुकसान हो सकता है। कृपया सुरक्षित और कुशल संचालन सुनिश्चित करने के लिए उपयोग की निगरानी करें।",
"gpu-power-level": "GPU पावर %",
"gpu-warning": "उच्च GPU उपयोग से ओवरहीटिंग हो सकती है, ऊर्जा खपत बढ़ सकती है, और समय के साथ हार्डवेयर को नुकसान हो सकता है। कृपया सुरक्षित और कुशल संचालन सुनिश्चित करने के लिए उपयोग की निगरानी करें।",
"save-changes": "Save Changes",
"saved": "परिवर्तनों को लागू किया जा रहा है",
"title": "कस्टम मोड",
"warning": "चेतावनी"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "मोनरो पता दर्ज करें",
"title": "मोनरो पता"
},
"monero-seed-words": "Monero Seed Words",
"network": "नेटवर्क",
"no-entry-guard": "कोई एंट्री गार्ड कनेक्ट नहीं है!",
"not-connected-to-tari": "Tari नेटवर्क से जुड़ा नहीं",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/id/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "Penggunaan CPU yang tinggi dapat menyebabkan panas berlebih, meningkatkan konsumsi energi, dan dapat menyebabkan kerusakan perangkat keras seiring waktu. Harap pantau penggunaan untuk memastikan operasi yang aman dan efisien.",
"gpu-power-level": "Daya GPU %",
"gpu-warning": "Penggunaan GPU yang tinggi dapat menyebabkan panas berlebih, meningkatkan konsumsi energi, dan dapat menyebabkan kerusakan perangkat keras seiring waktu. Harap pantau penggunaan untuk memastikan operasi yang aman dan efisien.",
"save-changes": "Save Changes",
"saved": "Menerapkan Perubahan",
"title": "Mode Kustom",
"warning": "Peringatan"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Masukkan alamat Monero",
"title": "Alamat Monero"
},
"monero-seed-words": "Monero Seed Words",
"network": "Jaringan",
"no-entry-guard": "Tidak ada Penjaga Masuk yang terhubung!",
"not-connected-to-tari": "Tidak terhubung ke Jaringan Tari",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/ja/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "高いCPU使用率は過熱を引き起こし、エネルギー消費を増加させ、時間とともにハードウェアの損傷を引き起こす可能性があります。安全で効率的な操作を確保するために使用状況を監視してください。",
"gpu-power-level": "GPUパワー%",
"gpu-warning": "高いGPU使用率は過熱を引き起こし、エネルギー消費を増加させ、時間とともにハードウェアの損傷を引き起こす可能性があります。安全で効率的な操作を確保するために使用状況を監視してください。",
"save-changes": "Save Changes",
"saved": "変更を適用中",
"title": "カスタムモード",
"warning": "警告"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Moneroアドレスを入力",
"title": "Moneroアドレス"
},
"monero-seed-words": "Monero Seed Words",
"network": "ネットワーク",
"no-entry-guard": "エントリーガードが接続されていません!",
"not-connected-to-tari": "Tariネットワークに接続されていません",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/ko/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "높은 CPU 사용은 과열을 유발하고 에너지 소비를 증가시킬 수 있으며, 시간이 지남에 따라 하드웨어 손상을 초래할 수 있습니다. 안전하고 효율적인 작동을 위해 사용량을 모니터링하세요.",
"gpu-power-level": "GPU 전력 %",
"gpu-warning": "높은 GPU 사용은 과열을 유발하고 에너지 소비를 증가시킬 수 있으며, 시간이 지남에 따라 하드웨어 손상을 초래할 수 있습니다. 안전하고 효율적인 작동을 위해 사용량을 모니터링하세요.",
"save-changes": "Save Changes",
"saved": "변경 사항 적용 중",
"title": "사용자 정의 모드",
"warning": "경고"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "모네로 주소 입력",
"title": "모네로 주소"
},
"monero-seed-words": "Monero Seed Words",
"network": "네트워크",
"no-entry-guard": "엔트리 가드가 연결되지 않았습니다!",
"not-connected-to-tari": "Tari 네트워크에 연결되지 않음",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/pl/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"cpu-warning": "Wysokie zużycie CPU może powodować przegrzewanie, zwiększać zużycie energii i prowadzić do uszkodzenia sprzętu z czasem. Proszę monitorować zużycie, aby zapewnić bezpieczną i efektywną pracę.",
"gpu-power-level": "Moc GPU %",
"gpu-warning": "Wysokie zużycie GPU może powodować przegrzewanie, zwiększać zużycie energii i prowadzić do uszkodzenia sprzętu z czasem. Proszę monitorować zużycie, aby zapewnić bezpieczną i efektywną pracę.",
"save-changes": "Save Changes",
"saved": "Zastosowanie zmian",
"title": "Tryb niestandardowy",
"warning": "Ostrzeżenie"
Expand Down Expand Up @@ -61,6 +62,7 @@
"placeholder": "Wprowadź address Monero",
"title": "Address Monero"
},
"monero-seed-words": "Monero Seed Words",
"network": "Sieć",
"no-entry-guard": "Brak połączenia z Entry Guardami!",
"not-connected-to-tari": "Nie połączono z siecią Tari",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/ru/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "Высокая загрузка CPU может вызвать перегрев, увеличить потребление энергии и привести к повреждению оборудования со временем. Пожалуйста, следите за использованием для обеспечения безопасной и эффективной работы.",
"gpu-power-level": "Мощность GPU %",
"gpu-warning": "Высокая загрузка GPU может вызвать перегрев, увеличить потребление энергии и привести к повреждению оборудования со временем. Пожалуйста, следите за использованием для обеспечения безопасной и эффективной работы.",
"save-changes": "Save Changes",
"saved": "Применение изменений",
"title": "Пользовательский режим",
"warning": "Предупреждение"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Введите адрес Monero",
"title": "Адрес Monero"
},
"monero-seed-words": "Monero Seed Words",
"network": "Сеть",
"no-entry-guard": "Нет подключения к Entry Guard!",
"not-connected-to-tari": "Не подключено к сети Tari",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/tr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cpu-warning": "Yüksek CPU kullanımı aşırı ısınmaya, enerji tüketiminin artmasına ve zamanla donanım hasarına yol açabilir. Güvenli ve verimli bir çalışma sağlamak için kullanımı izleyin.",
"gpu-power-level": "GPU Gücü %",
"gpu-warning": "Yüksek GPU kullanımı aşırı ısınmaya, enerji tüketiminin artmasına ve zamanla donanım hasarına yol açabilir. Güvenli ve verimli bir çalışma sağlamak için kullanımı izleyin.",
"save-changes": "Save Changes",
"saved": "Değişiklikler Uygulanıyor",
"title": "Özel Mod",
"warning": "Uyarı"
Expand Down Expand Up @@ -60,6 +61,7 @@
"placeholder": "Monero adresini girin",
"title": "Monero Adresi"
},
"monero-seed-words": "Monero Seed Words",
"network": "",
"no-entry-guard": "Giriş Koruması bağlı değil!",
"not-connected-to-tari": "Tari Ağına Bağlı Değil",
Expand Down
48 changes: 47 additions & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ log = "0.4.22"
log4rs = "1.3.0"
minotari_node_grpc_client = { git = "https://github.com/tari-project/tari.git", branch = "development" }
minotari_wallet_grpc_client = { git = "https://github.com/tari-project/tari.git", branch = "development" }
monero-address-creator = { git = "https://github.com/tari-project/monero-address-creator.git", rev = "6129ca0" }
nix = { version = "0.29.0", features = ["signal"] }
nvml-wrapper = "0.10.0"
open = "5"
Expand Down Expand Up @@ -94,6 +95,7 @@ tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7.11", features = ["compat"] }
xz2 = { version = "0.1.7", features = ["static"] } # static bind lzma
zip = "2.2.0"
serde_cbor = "0.11.2"

[target.'cfg(windows)'.dependencies]
winreg = "0.52.0"
Expand Down
Loading

0 comments on commit a402071

Please sign in to comment.