diff --git a/pyproject.toml b/pyproject.toml index 94532c7..dfb0e7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore" -version = "2.2.2" +version = "2.2.3" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, { name="Alex Wolden", email="awolden@gmail.com" }, diff --git a/src/meshcore/commands/device.py b/src/meshcore/commands/device.py index 958d4bc..a2d8f29 100644 --- a/src/meshcore/commands/device.py +++ b/src/meshcore/commands/device.py @@ -206,6 +206,11 @@ class DeviceCommands(CommandHandlerBase): logger.debug("Requesting private key export") return await self.send(b"\x17", [EventType.PRIVATE_KEY, EventType.DISABLED, EventType.ERROR]) + async def import_private_key(self, key) -> Event: + logger.debug("Requesting private key import") + data = b"\x18" + key + return await self.send(data, [EventType.OK, EventType.ERROR]) + async def get_stats_core(self) -> Event: logger.debug("Getting core statistics") # CMD_GET_STATS (56) + STATS_TYPE_CORE (0)