mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
feat: Implement optimized contact fetching by public key to enhance performance
This commit is contained in:
@@ -31,6 +31,14 @@ class FrameBuilder {
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
/// Build GetContactByKey command - retrieves a single contact by public key
|
||||
static Uint8List buildGetContactByKey(Uint8List publicKey) {
|
||||
final writer = BufferWriter();
|
||||
writer.writeByte(MeshCoreConstants.cmdGetContactByKey); // 0x1E (30)
|
||||
writer.writeBytes(publicKey); // 32 bytes
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
/// Build AddUpdateContact command
|
||||
static Uint8List buildAddUpdateContact(Contact contact) {
|
||||
final writer = BufferWriter();
|
||||
|
||||
Reference in New Issue
Block a user