mirror of https://github.com/status-im/go-waku.git
fix: c bindings docs
This commit is contained in:
parent
31f3ed83da
commit
205270924a
|
@ -108,14 +108,14 @@ The criteria to create subscription to a light node in JSON Format:
|
|||
```ts
|
||||
{
|
||||
contentFilters: ContentFilter[];
|
||||
topic: string?;
|
||||
pubsubTopic: string?;
|
||||
}
|
||||
```
|
||||
|
||||
Fields:
|
||||
|
||||
- `contentFilters`: Array of [`ContentFilter`](#contentfilter-type) being subscribed to / unsubscribed from.
|
||||
- `topic`: Optional message topic.
|
||||
- `topic`: Optional pubsub topic.
|
||||
|
||||
|
||||
### `ContentFilter` type
|
||||
|
@ -128,11 +128,11 @@ Fields:
|
|||
|
||||
Fields:
|
||||
|
||||
- `contentTopic`: The content topic of a waku message.
|
||||
- `contentTopic`: The content topic of a Waku message.
|
||||
|
||||
### `StoreQuery` type
|
||||
|
||||
Criteria used to retreive historical messages
|
||||
Criteria used to retrieve historical messages
|
||||
|
||||
```ts
|
||||
interface StoreQuery {
|
||||
|
@ -196,7 +196,7 @@ interface Index {
|
|||
Fields:
|
||||
|
||||
- `digest`: Hash of the message at this [`Index`](#index-type).
|
||||
- `receiverTime`: UNIX timestamp in nanoseconds at which the message at this [`Index`](#index-type) was received
|
||||
- `receiverTime`: UNIX timestamp in nanoseconds at which the message at this [`Index`](#index-type) was received.
|
||||
- `senderTime`: UNIX timestamp in nanoseconds at which the message is generated by its sender.
|
||||
- `pubsubTopic`: The pubsub topic of the message at this [`Index`](#index-type).
|
||||
|
||||
|
@ -782,13 +782,13 @@ For example:
|
|||
|
||||
## Waku Filter
|
||||
|
||||
### `extern char* waku_filter_subscribe(char* filterJSON, char* peerID, int ms)`
|
||||
### `extern char* waku_filter_subscribe(char* filterJSON, char* peerID, int timeoutMs)`
|
||||
|
||||
Creates a subscription in a lightnode for messages that matches a content filter and optionally a [PubSub `topic`](https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor).
|
||||
|
||||
**Parameters**
|
||||
|
||||
1. `char* filterJSON`: JSON string containing the [`FilterSubscription`](#filtersubscription-type) to unsubscribe from
|
||||
1. `char* filterJSON`: JSON string containing the [`FilterSubscription`](#filtersubscription-type) to subscribe to.
|
||||
2. `char* peerID`: Peer ID to subscribe to.
|
||||
The peer must be already known.
|
||||
It must have been added before with [`waku_add_peer`](#extern-char-waku_add_peerchar-address-char-protocolid)
|
||||
|
@ -1060,7 +1060,6 @@ Decode a base64 string (useful for reading the payload from Waku Messages).
|
|||
A [`JsonResponse`](#jsonresponse-type).
|
||||
If the execution is successful, the `result` field contains the decoded payload.
|
||||
|
||||
|
||||
# Copyright
|
||||
|
||||
Copyright and related rights waived via
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
// "contentTopic": "the content topic"
|
||||
// }, ...
|
||||
// ],
|
||||
// "topic": "the pubsub topic" // optional
|
||||
// "pubsubTopic": "the pubsub topic" // optional
|
||||
// }
|
||||
// peerID should contain the ID of a peer supporting the filter protocol. Use NULL to automatically select a node
|
||||
// If ms is greater than 0, the subscription must happen before the timeout
|
||||
|
@ -34,7 +34,7 @@ func waku_filter_subscribe(filterJSON *C.char, peerID *C.char, ms C.int) *C.char
|
|||
// "contentTopic": "the content topic"
|
||||
// }, ...
|
||||
// ],
|
||||
// "topic": "the pubsub topic" // optional
|
||||
// "pubsubTopic": "the pubsub topic" // optional
|
||||
// }
|
||||
// If ms is greater than 0, the subscription must happen before the timeout
|
||||
// (in milliseconds) is reached, or an error will be returned
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
type FilterArgument struct {
|
||||
Topic string `json:"topic,omitempty"`
|
||||
Topic string `json:"pubsubTopic,omitempty"`
|
||||
ContentFilters []pb.ContentFilter `json:"contentFilters,omitempty"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue