File tree 7 files changed +21
-0
lines changed
7 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Added
11
+
12
+ - ` multicodec ` property from protocol interfaces.
13
+
14
+ ### Removed
15
+
16
+ - Dependency on ` @waku/peer-exchange ` .
17
+
10
18
## [ @waku/core @0.0.10] - 2023-01-25
11
19
12
20
### Changed
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export type UnsubscribeFunction = () => Promise<void>;
65
65
* - https://github.com/status-im/nwaku/issues/948
66
66
*/
67
67
class Filter implements IFilter {
68
+ multicodec : string ;
68
69
pubSubTopic : string ;
69
70
private subscriptions : Map < string , Callback < any > > ;
70
71
private decoders : Map <
@@ -73,6 +74,7 @@ class Filter implements IFilter {
73
74
> ;
74
75
75
76
constructor ( public components : FilterComponents , options ?: CreateOptions ) {
77
+ this . multicodec = FilterCodec ;
76
78
this . subscriptions = new Map ( ) ;
77
79
this . decoders = new Map ( ) ;
78
80
this . pubSubTopic = options ?. pubSubTopic ?? DefaultPubSubTopic ;
Original file line number Diff line number Diff line change @@ -52,9 +52,11 @@ export interface CreateOptions {
52
52
* Implements the [Waku v2 Light Push protocol](https://rfc.vac.dev/spec/19/).
53
53
*/
54
54
class LightPush implements ILightPush {
55
+ multicodec : string ;
55
56
pubSubTopic : string ;
56
57
57
58
constructor ( public components : LightPushComponents , options ?: CreateOptions ) {
59
+ this . multicodec = LightPushCodec ;
58
60
this . pubSubTopic = options ?. pubSubTopic ?? DefaultPubSubTopic ;
59
61
}
60
62
Original file line number Diff line number Diff line change @@ -105,9 +105,11 @@ export interface QueryOptions {
105
105
* The Waku Store protocol can be used to retrieved historical messages.
106
106
*/
107
107
class Store implements IStore {
108
+ multicodec : string ;
108
109
pubSubTopic : string ;
109
110
110
111
constructor ( public components : StoreComponents , options ?: CreateOptions ) {
112
+ this . multicodec = StoreCodec ;
111
113
this . pubSubTopic = options ?. pubSubTopic ?? DefaultPubSubTopic ;
112
114
}
113
115
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Added
11
+
12
+ - ` multicodec ` property on protocol interfaces.
13
+
10
14
## [ 0.0.7] - 2023-01-18
11
15
12
16
### Added
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export enum Protocols {
12
12
}
13
13
14
14
export interface PointToPointProtocol {
15
+ multicodec : string ;
15
16
peerStore : PeerStore ;
16
17
peers : ( ) => Promise < Peer [ ] > ;
17
18
}
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const log = debug("waku:peer-exchange");
30
30
* Implementation of the Peer Exchange protocol (https://rfc.vac.dev/spec/34/)
31
31
*/
32
32
export class WakuPeerExchange implements IPeerExchange {
33
+ multicodec : string ;
33
34
private callback :
34
35
| ( ( response : PeerExchangeResponse ) => Promise < void > )
35
36
| undefined ;
@@ -42,6 +43,7 @@ export class WakuPeerExchange implements IPeerExchange {
42
43
public components : PeerExchangeComponents ,
43
44
public createOptions ?: ProtocolOptions
44
45
) {
46
+ this . multicodec = PeerExchangeCodec ;
45
47
this . components . registrar
46
48
. handle ( PeerExchangeCodec , this . handler . bind ( this ) )
47
49
. catch ( ( e ) => log ( "Failed to register peer exchange protocol" , e ) ) ;
You can’t perform that action at this time.
0 commit comments