This commit is contained in:
Jimmy Debe 2025-08-28 10:24:29 -04:00 committed by GitHub
parent 532b9071ad
commit a959364467
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,7 @@ Current Q&A platforms are controlled by centralized organizations who have the a
block and censor content published by any user.
This could cause a user to not express their ideas or ask reall questions with fear of prosecution by a thrid party.
Qaku aims to solve this by utilizing a few [10/WAKU]() protocols to create a Q&A forum.
Qaku aims to solve this by utilizing a few [10/WAKU](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/10/waku2.md) protocols to create a Q&A forum.
The user can create a Q&A board with a wallet address,
send questions or answers directly to other peers without the need of storing and/or retrieving the content from a centralized server/domain.
Familiar features like upvoting, sharable links, and board moderation are also capable.
@ -33,11 +33,24 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
“SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and
“OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).
Clients publish questions to a `content-topic` address which is held by the Waku Network.
A collection of questions are owned by the `content-topic`,
while a collection of answers are owned by the questions.
All clients MUST have and identity recognized by the network to publish new content.
More on identity [below](#identity).
A Q&A board is a `content-topic` which is made available by on the Waku network.
Users subscribe to the `content-topic` using [12/WAKU2-FILTER](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/12/filter.md) and
to listen to new published messages.
Each message is identified by its `message_type`.
A collection of questions are the children of a `content-topic`,
while a collection of answers are the children of a question.
All clients MUST have an `identity` recognized by the network to publish new content.
### Identity
All clients MUST have `identity` consisting of a public address identifier in the form of a hexadecimal string.
Clients generate cryptographic key pair, public and private keys, and
the private key MAY be encrypt a password.
Public addresses are derived from the public keys as a hexadecimal string.
This address SHOULD be recongized by the other clients in the network to idenitify clients.
Each `identity` SHOULD be stored locally.
The address SHOULD be used to sign and verify messages.
### Creating a New Board
@ -47,9 +60,11 @@ as the `owner`is the first client to know the `content-topic` for the new board.
At the time of creation, the `owner` SHOULD create a `ControlMessage` to configure a Q&A board
and publish to the Waku network.
#### Control Message
This message contains all initial Q&A board.
This message contains the initial Q&A board configuration.
The `ControlMessage` SHOULD only be updated by the `owner`.
The `ControlMessage` is a JSON object:
@ -66,69 +81,69 @@ The `ControlMessage` is a JSON object:
enabled: boolean,
timestamp: number, // time the ControlMessage is created
owner: string, // the public address of the owner
admins: string[], // a list of addresses
moderation: boolean, //
admins: string[],
moderation: boolean,
description: string,
updated: number,
startDate: number,
endDate?: number,
allowsParticipantsReplies: number,
delegationInfo?: DelegationInfo
updated: number,
startDate: number, // optional, enforced by the application
allowsParticipantsReplies: number // optional, enforced by the application
]
}
```
`admins`:
- A list of client `identity` that are able to moderate the Q&A board
`id`:
- MAY be generated from the `title` value, `timestamp` value, and the `owner` public address value.
- MAY be hexadecimal characters of SHA-256***
- RECOMMENDED hash using SHA256
Clients subscribed to the Q&A board `content-topic`, using the [12/WAKU2-FILTER](),
`moderation`:
- If the question can be moderated by the `owner` and `admins`.
- It MUST be enforced by the application, see [messages](#Messsages)
Clients subscribed to the Q&A board `content-topic` using the [12/WAKU2-FILTER](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/12/filter.md),
MUST be able to view the `ControlMessage`.
### Identity
All clients MUST have `identity` consisting of a public address identifier in the form of a hexadecimal string.
Clients generate cryptographic key pair, public and private keys, and
the private key MAY be encrypt a password.
Public addresses are derived from the public keys as a hexadecimal string.
This address SHOULD be recongized by the other clients in the network to idenitify clients.
Each `identity` SHOULD be stored locally.
The address SHOULD be used to sign and verify messages.
### Messages
### Other Message Types
The Waku network processes real-time message updates, which enables new questions and
answers to be acceisble quickly.
All questions and answers are published by the user or
the `owner` using [19/WAKU2-LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) on the Waku network.
Using the [13/WAKU-STORE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/13/store.md) protocol,
published messages are stored by Waku store nodes.
When clients subscribe to a Q&A board, the message history is retrieved from [13/WAKU-STORE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/13/store.md) nodes.
Clients messages published to a Q&A board's `content-topic` SHOULD remain accessible on the Waku network.
No client will be able to remove the message once published.
The `admins` and `owner` MAY moderate certain published messages making some content not visible to all users.
A conec ulti
Messages are sent to a `content_topic` that are identified as a `message_type`.
```js
{
"ModerationMessage" : [
"hash": string, // The hash of the question
"moderated": boolean
]
}
The [13/WAKU-STORE]() nodes provide historical storage of the Qaku messages.
The following `message_type`s used in Qaku include:
- Question Message
- Answered Message
- Upvote Message
- Moderation Message
- Poll Message
```
#### Question Message
The `QuestionMessage` type is generated by any user asking a new question on a Qaku board.
-
The `QuestionMessage` type is generated by clients publishing a new question to a Q&A board.
Each question MAY have an `author` whos value is the publishing client's `identity`.
The client does not need to be the `owner` of the Q&A board.
Also the `owner` can not retrict any `identity` from publishing a message.
```js
{
"QuestionMessage" : [
"question": string,
"timestamp": number,
"author?": identity,
"delegationInfo?": delegationInfo
"question": string, // The question being published
"timestamp": number, // the time when the question being published
"author": identity // the identity of the client
]
}
@ -136,16 +151,18 @@ The `QuestionMessage` type is generated by any user asking a new question on a Q
#### Answered Message
The `AnswerMessage` type is generated by any sending an answer to the Qaku board.
-
The `AnswerMessage` type is generated by clients publishing a answer to a question.
Each `AnswerMessage` SHOULD have a parent `Questionmessage` type.
```js
{
"AnswerMessage" : [
hash: string,
"AnsweredMessage" : [
questionId: string, // The parent QuestionMessage
hash: string, // Hash of
text: string,
timestamp: number,
delegationInfo?: delegationInfo
]
}
@ -153,31 +170,26 @@ The `AnswerMessage` type is generated by any sending an answer to the Qaku board
#### Upvote Message
A `UpVoteMessage` is an optional feature that MUST be enforced by the web appliciation.
```js
{
"UpVoteMessage" : [
questionId: string,
hash: string,
type: UpvoteType,
timestamp: number,
delegationInfo?: DelegationInfo;
questionId: string, The hash of the question
hash: string, // hash of the message
type: string, // the upvote for which message type (AnswerMessage or QuestionMessage)
timestamp: number, // the time of the upvote
]
}
```
The owner MUST be able to enable and disable questions added to the board.
When a new question is created, the interface SHOULD lis
Qaku uses the following [10/WAKU]() protocols:
- the [19/WAKU2-LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) to push a message type to the Waku network.
- the [12/WAKU2-FILTER]() to subscribe to Waku `content_topic` and listen to messages published to that topic.
- the [13/WAKU-STORE]() to query and load old messages from the Waku network for users.
- A new `content_topic` is created when a new Q&A board is created.
- All questions and answer are pushed to the content_topic
## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
## References
- [10/WAKU](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/10/waku2.md)
- [12/WAKU2-FILTER](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/12/filter.md)
- [19/WAKU2-LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md)
- [13/WAKU-STORE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/13/store.md)