quiet
quiet copied to clipboard
QSS: Add channels, messages, certificates to server invite data
The invite data should contain enough information for a peer to be able to connect to other peers, see channels and messages, and validate messages.
In order to connect to other peers, the minimum we need is a list of peer addresses, the community network PSK, and the owner’s OrbitDB identity. This is what exists in our current invite links. Additionally, we need ownerOrbitDbIdentity to validate CommunityMetadata which we need in order to validate Certificates which we need in order to validate Messages. Channels are needed also to see messages. So I think we will need the following pieces of data:
InviteData (JSON): psk ownerOrbitDbIdentity peerList
CommunityMetadata (JSON OrbitDB entry)
Certificates (JSON array of OrbitDB entries)
Messages (JSON array of OrbitDB entries)
Channels (JSON array of OrbitDB entries)
We can include this in one JSON object returned by the /invite API endpoint, so that could look something like this:
{
invite: {
psk: string
ownerOrbitDbIdentity: string
peerList: string[]
},
communityMetadata: CommunityMetadataEntry,
certificates: CertificateEntry[],
messages: MessageEntry[]
channels: PublicChannelEntry[]
}
We have discussed this issue a bit, but I think it works as is and is good to proceed on. @leblowl any objections?
Based on @holmesworcester comment on #2432, I think we should leave out message entries since we intend for users to be able to incrementally download message data from the QSS server.
@adrastaea sorry for wobbling on this, but let's include message data.