You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
568 B
26 lines
568 B
#pragma once |
|
|
|
#include <QString> |
|
#include <QByteArray> |
|
#include <QList> |
|
#include <cstdint> |
|
#include "../db/db_manager.h" |
|
|
|
#define INVITE_LINK_VERSION 0x01 |
|
|
|
struct InviteAddr { |
|
int family; // 4=IPv4, 6=IPv6 |
|
QByteArray address; |
|
quint16 port; |
|
}; |
|
|
|
struct InviteData { |
|
QString channelId; |
|
QByteArray pubkey; |
|
QList<InviteAddr> addrs; |
|
}; |
|
|
|
QString encodeInviteLink(const QString& channelId, const QByteArray& pubkey, |
|
const QList<NodeAddr>& addrs); |
|
|
|
InviteData decodeInviteLink(const QString& link);
|
|
|