add helper functions for advert types

This commit is contained in:
liamcottle 2025-02-12 23:05:19 +13:00
parent defef4bddf
commit d9cfad9581
2 changed files with 15 additions and 4 deletions

View file

@ -287,6 +287,14 @@ class Connection extends EventEmitter {
});
}
async sendFloodAdvert() {
await this.sendCommandSendSelfAdvert(Constants.SelfAdvertTypes.Flood);
}
async sendZeroHopAdvert() {
await this.sendCommandSendSelfAdvert(Constants.SelfAdvertTypes.ZeroHop);
}
getContacts() {
return new Promise(async (resolve, reject) => {