implement advert_path

This commit is contained in:
Florent
2026-03-07 17:42:41 -04:00
parent 0769afa475
commit 462c4311d3
5 changed files with 24 additions and 1 deletions

View File

@@ -182,3 +182,9 @@ class ContactCommands(CommandHandlerBase):
async def get_autoadd_config(self) -> Event:
data = b"\x3B"
return await self.send(data, [EventType.AUTOADD_CONFIG, EventType.ERROR])
async def get_advert_path(self, key: DestinationType) -> Event:
key_bytes = _validate_destination(key, prefix_length=32)
logger.debug(f"getting advert path for: {key} {key_bytes.hex()}")
data = b"\x2a\0" + key_bytes
return await self.send(data, [EventType.ADVERT_PATH, EventType.ERROR])