mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-07-07 14:01:55 +00:00
* feat: interface pubsub * chore: pubsub router tests * chore: move pubsub abstractions from gossipsub * chore: address review * chore: revamp docs * chore: add emit self tests to interface * chore: refactor base tests * chore: publish should only accept one topic per api call * chore: normalize msg before emit * chore: do not reset inbound stream * chore: apply suggestions from code review Co-authored-by: Jacob Heun <jacobheun@gmail.com> * chore: address review * fix: remove subscribe handler * chore: remove bits from create peerId Co-authored-by: Jacob Heun <jacobheun@gmail.com> * chore: remove delay from topic validators tests * chore: add event emitter information * fix: topic validator docs Co-authored-by: Jacob Heun <jacobheun@gmail.com>
21 lines
443 B
JavaScript
21 lines
443 B
JavaScript
'use strict'
|
|
module.exports = `
|
|
message RPC {
|
|
repeated SubOpts subscriptions = 1;
|
|
repeated Message msgs = 2;
|
|
|
|
message SubOpts {
|
|
optional bool subscribe = 1; // subscribe or unsubcribe
|
|
optional string topicID = 2;
|
|
}
|
|
|
|
message Message {
|
|
optional bytes from = 1;
|
|
optional bytes data = 2;
|
|
optional bytes seqno = 3;
|
|
repeated string topicIDs = 4;
|
|
optional bytes signature = 5;
|
|
optional bytes key = 6;
|
|
}
|
|
}`
|