Skip to content

Commit f174b5a

Browse files
author
Tuyen
committedMar 16, 2020
Update README.md
1 parent c7459e7 commit f174b5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎README.md

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Options is an optional object with the following key-value pairs:
6767

6868
* **`fallbackToFloodsub`**: boolean identifying whether the node should fallback to the floodsub protocol, if another connecting peer does not support gossipsub (defaults to **true**).
6969
* **`emitSelf`**: boolean identifying whether the node should emit to self on publish, in the event of the topic being subscribed (defaults to **false**).
70+
* **`msgIdFn`**: a function defining the message id given a message, this is optional. For example:
71+
```js
72+
const msgIdFn = (message) => Buffer.from(hash(message.data)).toString("base64")
73+
```
7074

7175
For the remaining API, see https://github.com/libp2p/js-libp2p-pubsub
7276

0 commit comments

Comments
 (0)