mirror of https://github.com/vacp2p/rfc.git
Minor improvements (#294)
This commit is contained in:
parent
fb198dc0e4
commit
34636b67e6
|
@ -78,17 +78,18 @@ message RPC {
|
|||
optional string topicid = 2;
|
||||
}
|
||||
|
||||
message Message {
|
||||
optional string from = 1;
|
||||
optional bytes data = 2;
|
||||
optional bytes seqno = 3;
|
||||
repeated string topicIDs = 4;
|
||||
optional bytes signature = 5;
|
||||
optional bytes key = 6;
|
||||
message Message {
|
||||
optional string from = 1;
|
||||
optional bytes data = 2;
|
||||
optional bytes seqno = 3;
|
||||
repeated string topicIDs = 4;
|
||||
optional bytes signature = 5;
|
||||
optional bytes key = 6;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
WakuSub does not currently use the `ControlMessage` defined in GossipSub.
|
||||
WakuRelay does not currently use the `ControlMessage` defined in GossipSub.
|
||||
However, later versions will add likely add this capability.
|
||||
|
||||
`TopicDescriptor` as defined in the PubSub interface spec is not currently used.
|
||||
|
@ -115,7 +116,7 @@ The `key` field MAY be present and relates to signing. See PubSub spec for more
|
|||
|
||||
## SubOpts
|
||||
|
||||
To do topic subscription management, we MAY send updates to our peers. If we do so, then:
|
||||
To do topic subscription management, we MAY send updates using `SubOpts` to our peers. If we do so, then:
|
||||
|
||||
The `subscribe` field MUST contain a boolean, where 1 means subscribe and 0 means unsubscribe to a topic.
|
||||
|
||||
|
@ -175,7 +176,7 @@ Copyright and related rights waived via
|
|||
3. [GossipSub
|
||||
v1.1](https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md)
|
||||
|
||||
4. [Waku v1 spec](specs.vac.dev/waku/waku.html)
|
||||
4. [Waku v1 spec](https://specs.vac.dev/waku/waku.html)
|
||||
|
||||
5. [Whisper spec (EIP627)](https://eips.ethereum.org/EIPS/eip-627)
|
||||
|
||||
|
|
|
@ -61,8 +61,9 @@ The following structured types are defined for use throughout the document:
|
|||
Refer to [`Waku Message` specification](https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md) for more information.
|
||||
|
||||
`WakuMessage` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ---: | :---: | :---: | --- |
|
||||
| `payload` | `String` | mandatory | The message payload |
|
||||
| `contentTopic` | `Number` | optional | Message content topic for optional content-based filtering |
|
||||
| `version` | `Number` | optional | Message version. Used to indicate type of payload encryption. Default version is 0 (no payload encryption). |
|
||||
|
@ -88,8 +89,9 @@ The following structured types are defined for use on the Debug API:
|
|||
#### WakuInfo
|
||||
|
||||
`WakuInfo` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `listenStr` | `String` | mandatory | Address that the node is listening for |
|
||||
|
||||
### `get_waku_v2_debug_v1_info`
|
||||
|
@ -114,8 +116,9 @@ The following structured types are defined for use on the Relay API:
|
|||
#### WakuRelayMessage
|
||||
|
||||
`WakuRelayMessage` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: | ----------- |
|
||||
| `payload` | `String` | mandatory | The payload being relayed |
|
||||
| `contentTopic` | `Number` | optional | Message content topic for optional content-based filtering |
|
||||
|
||||
|
@ -128,7 +131,7 @@ The `post_waku_v2_relay_v1_message` method publishes a message to be relayed on
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topic` | `String` | mandatory | The [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) being published on |
|
||||
| `message` | [`WakuRelayMessage`](#WakuRelayMessage) | mandatory | The `message` being relayed |
|
||||
|
||||
|
@ -143,7 +146,7 @@ The `post_waku_v2_relay_v1_subscriptions` method subscribes a node to an array o
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topics` | `Array`[`String`] | mandatory | The [PubSub `topics`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) being subscribed to |
|
||||
|
||||
#### Response
|
||||
|
@ -157,7 +160,7 @@ The `delete_waku_v2_relay_v1_subscriptions` method unsubscribes a node from an a
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topics` | `Array`[`String`] | mandatory | The [PubSub `topics`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) being unsubscribed from |
|
||||
|
||||
#### Response
|
||||
|
@ -171,7 +174,7 @@ The `get_waku_v2_relay_v1_messages` method returns a list of messages that were
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topic` | `String` | mandatory | The [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) to poll for the latest messages |
|
||||
|
||||
#### Response
|
||||
|
@ -189,17 +192,19 @@ The following structured types are defined for use on the Store API:
|
|||
#### StoreResponse
|
||||
|
||||
`StoreResponse` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `messages` | `Array`[[`WakuMessage`](#WakuMessage)] | mandatory | Array of retrieved historical messages |
|
||||
| `pagingOptions` | [`PagingOptions`](#PagingOptions) | [conditional](#`get_waku_v2_store_v1_messages`) | Paging information from which to resume further historical queries |
|
||||
| `pagingOptions` | [`PagingOptions`](#PagingOptions) | [conditional](#get_waku_v2_store_v1_messages) | Paging information from which to resume further historical queries |
|
||||
|
||||
|
||||
#### PagingOptions
|
||||
|
||||
`PagingOptions` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `pageSize` | `Number` | mandatory | Number of messages to retrieve per page |
|
||||
| `cursor` | [`Index`](#Index) | optional | Message [`Index`](#Index) from which to perform pagination. If not included and `forward` is set to `true`, paging will be performed from the beginning of the list. If not included and `forward` is set to `false`, paging will be performed from the end of the list.|
|
||||
| `forward` | `Bool` | mandatory | `true` if paging forward, `false` if paging backward |
|
||||
|
@ -207,8 +212,9 @@ The following structured types are defined for use on the Store API:
|
|||
#### Index
|
||||
|
||||
`Index` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `digest` | `String` | mandatory | A hash for the message at this [`Index`](#Index) |
|
||||
| `receivedTime` | `Number` | mandatory | UNIX timestamp at which the message at this [`Index`](#Index) was received |
|
||||
|
||||
|
@ -219,7 +225,7 @@ The `get_waku_v2_store_v1_messages` method retrieves historical messages on spec
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topics` | `Array`[`Number`] | mandatory | Array of content topics to query for historical messages |
|
||||
| `pagingOptions` | [`PagingOptions`](#PagingOptions) | optional | Pagination information |
|
||||
|
||||
|
@ -238,8 +244,9 @@ The following structured types are defined for use on the Filter API:
|
|||
#### ContentFilter
|
||||
|
||||
`ContentFilter` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topics` | `Array`[`Number`] | mandatory | Array of message content topics |
|
||||
|
||||
### `post_waku_v2_filter_v1_subscription`
|
||||
|
@ -249,7 +256,7 @@ The `post_waku_v2_filter_v1_subscription` method creates a subscription in a [li
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `contentFilters` | `Array`[[`ContentFilter`](#ContentFilter)] | mandatory | Array of content filters being subscribed to |
|
||||
| `topic` | `String` | optional | Message topic |
|
||||
|
||||
|
@ -264,7 +271,7 @@ The `delete_waku_v2_filter_v1_subscription` method removes subscriptions in a [l
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `contentFilters` | `Array`[[`ContentFilter`](#ContentFilter)] | mandatory | Array of content filters being unsubscribed from |
|
||||
| `topic` | `String` | optional | Message topic |
|
||||
|
||||
|
@ -279,7 +286,7 @@ The `get_waku_v2_filter_v1_messages` method returns a list of messages that were
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `contentTopic` | `Number` | mandatory | The content topic to poll for the latest messages |
|
||||
|
||||
#### Response
|
||||
|
@ -297,8 +304,9 @@ The following structured types are defined for use on the Admin API:
|
|||
#### WakuPeer
|
||||
|
||||
`WakuPeer` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `multiaddr` | `String` | mandatory | Multiaddress containing this peer's location and identity |
|
||||
| `protocol` | `String` | mandatory | Protocol that this peer is registered for |
|
||||
| `connected` | `bool` | mandatory | `true` if peer has active connection for this `protocol`, `false` if not |
|
||||
|
@ -326,8 +334,9 @@ The following structured types are defined for use on the Private API:
|
|||
#### KeyPair
|
||||
|
||||
`KeyPair` is an `Object` containing the following fields:
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `privateKey` | `String` | mandatory | Private key as hex encoded data string |
|
||||
| `publicKey` | `String` | mandatory | Public key as hex encoded data string |
|
||||
|
||||
|
@ -362,7 +371,7 @@ Before being relayed, the message payload is encrypted using the supplied symmet
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topic` | `String` | mandatory | The [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) being published on |
|
||||
| `message` | [`WakuRelayMessage`](#WakuRelayMessage) | mandatory | The (unencrypted) `message` being relayed |
|
||||
| `symkey` | `String` | mandatory | The hex encoded symmetric key to use for payload encryption. This field MUST be included if symmetric key cryptography is selected |
|
||||
|
@ -380,7 +389,7 @@ Before being relayed, the message payload is encrypted using the supplied public
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topic` | `String` | mandatory | The [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) being published on |
|
||||
| `message` | [`WakuRelayMessage`](#WakuRelayMessage) | mandatory | The (unencrypted) `message` being relayed |
|
||||
| `publicKey` | `String` | mandatory | The hex encoded public key to use for payload encryption. This field MUST be included if asymmetric key cryptography is selected |
|
||||
|
@ -398,7 +407,7 @@ Before returning the messages, the server decrypts the message payloads using th
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topic` | `String` | mandatory | The [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) to poll for the latest messages |
|
||||
| `symkey` | `String` | mandatory | The hex encoded symmetric key to use for payload decryption. This field MUST be included if symmetric key cryptography is selected |
|
||||
|
||||
|
@ -415,7 +424,7 @@ Before returning the messages, the server decrypts the message payloads using th
|
|||
#### Parameters
|
||||
|
||||
| Field | Type | Inclusion | Description |
|
||||
| ----: | :--: | :--: |----------- |
|
||||
| ----: | :---: | :---: |----------- |
|
||||
| `topic` | `String` | mandatory | The [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor) to poll for the latest messages |
|
||||
| `privateKey` | `String` | mandatory | The hex encoded private key to use for payload decryption. This field MUST be included if asymmetric key cryptography is selected |
|
||||
|
||||
|
|
Loading…
Reference in New Issue