From 3aeb57b4dfe2fecb3b84231c33778f4a305aa4c1 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 11 Dec 2023 02:06:00 +0000 Subject: [PATCH] api(deltachat-jsonrpc-client): add Account.{import,export}_self_keys --- .../src/deltachat_rpc_client/account.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/account.py b/deltachat-rpc-client/src/deltachat_rpc_client/account.py index 1bc40b19a..70bd16697 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/account.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/account.py @@ -300,3 +300,13 @@ class Account: def import_backup(self, path, passphrase: str = "") -> None: """Import backup.""" self._rpc.import_backup(self.id, str(path), passphrase) + + def export_self_keys(self, path) -> None: + """Export keys.""" + passphrase = "" # Setting passphrase is currently not supported. + self._rpc.export_self_keys(self.id, str(path), passphrase) + + def import_self_keys(self, path) -> None: + """Import keys.""" + passphrase = "" # Importing passphrase-protected keys is currently not supported. + self._rpc.import_self_keys(self.id, str(path), passphrase)