add share contact command

This commit is contained in:
liamcottle 2025-02-15 20:37:17 +13:00
parent 28c7f14e74
commit cf4e1ccd83
3 changed files with 18 additions and 6 deletions

View file

@ -147,6 +147,13 @@ class Connection extends EventEmitter {
await this.sendToRadioFrame(data.toBytes());
}
async sendCommandShareContact(pubKey) {
const data = new BufferWriter();
data.writeByte(Constants.CommandCodes.ShareContact);
data.writeBytes(pubKey); // 32 bytes
await this.sendToRadioFrame(data.toBytes());
}
onFrameReceived(frame) {
// emit received frame

View file

@ -27,6 +27,7 @@ class Constants {
ResetPath: 13,
SetAdvertLatLon: 14,
RemoveContact: 15,
ShareContact: 16,
}
static ResponseCodes = {