File tree Expand file tree Collapse file tree 3 files changed +81
-0
lines changed Expand file tree Collapse file tree 3 files changed +81
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This file is part of the Trezor project.
2
+ #
3
+ # Copyright (C) 2012-2025 SatoshiLabs and contributors
4
+ #
5
+ # This library is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Lesser General Public License version 3
7
+ # as published by the Free Software Foundation.
8
+ #
9
+ # This library is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU Lesser General Public License for more details.
13
+ #
14
+ # You should have received a copy of the License along with this library.
15
+ # If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
16
+
17
+ from __future__ import annotations
18
+
19
+ import typing as t
20
+
21
+ import click
22
+
23
+ from .. import evolu , messages
24
+ from . import with_client
25
+
26
+ if t .TYPE_CHECKING :
27
+ from ..client import TrezorClient
28
+
29
+
30
+ @click .group (name = "evolu" )
31
+ def cli () -> None :
32
+ """Evolu commands."""
33
+
34
+
35
+ @cli .command ()
36
+ @with_client
37
+ def get_keys (
38
+ client : "TrezorClient" ,
39
+ ) -> dict [str , str ]:
40
+ """Return the SLIP-21 Evolu keys."""
41
+
42
+ keys : messages .EvoluKeys = evolu .get_evolu_keys (
43
+ client ,
44
+ )
45
+ return {
46
+ "owner_id" : keys .owner_id .hex (),
47
+ "write_key" : keys .write_key .hex (),
48
+ "encryption_key" : keys .encryption_key .hex (),
49
+ }
Original file line number Diff line number Diff line change 40
40
device ,
41
41
eos ,
42
42
ethereum ,
43
+ evolu ,
43
44
fido ,
44
45
firmware ,
45
46
monero ,
@@ -405,6 +406,7 @@ def wait_for_emulator(obj: TrezorConnection, timeout: float) -> None:
405
406
cli .add_command (device .cli )
406
407
cli .add_command (eos .cli )
407
408
cli .add_command (ethereum .cli )
409
+ cli .add_command (evolu .cli )
408
410
cli .add_command (fido .cli )
409
411
cli .add_command (monero .cli )
410
412
cli .add_command (nem .cli )
Original file line number Diff line number Diff line change
1
+ # This file is part of the Trezor project.
2
+ #
3
+ # Copyright (C) 2012-2025 SatoshiLabs and contributors
4
+ #
5
+ # This library is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Lesser General Public License version 3
7
+ # as published by the Free Software Foundation.
8
+ #
9
+ # This library is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU Lesser General Public License for more details.
13
+ #
14
+ # You should have received a copy of the License along with this library.
15
+ # If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
16
+
17
+
18
+ from typing import TYPE_CHECKING
19
+
20
+ from . import messages
21
+
22
+ if TYPE_CHECKING :
23
+ from .client import TrezorClient
24
+
25
+
26
+ def get_evolu_keys (client : "TrezorClient" ) -> messages .EvoluKeys :
27
+ return client .call (
28
+ messages .EvoluGetKeys (),
29
+ expect = messages .EvoluKeys ,
30
+ )
You can’t perform that action at this time.
0 commit comments