@@ -22,18 +22,16 @@ declare class PubsubBaseProtocol {
2222     * @param  {String } props.debugName log namespace 
2323     * @param  {Array<string>|string } props.multicodecs protocol identificers to connect 
2424     * @param  {Libp2p } props.libp2p 
25-      * @param  {boolean } [props.signMessages = true] if messages should be signed 
26-      * @param  {boolean } [props.strictSigning = true] if message signing should be required 
25+      * @param  {SignaturePolicy } [props.globalSignaturePolicy = SignaturePolicy.StrictSign] defines how signatures should be handled 
2726     * @param  {boolean } [props.canRelayMessage = false] if can relay messages not subscribed 
2827     * @param  {boolean } [props.emitSelf = false] if publish should emit to self, if subscribed 
2928     * @abstract  
3029     */ 
31-     constructor ( {  debugName,  multicodecs,  libp2p,  signMessages ,  strictSigning ,  canRelayMessage,  emitSelf } : { 
30+     constructor ( {  debugName,  multicodecs,  libp2p,  globalSignaturePolicy ,  canRelayMessage,  emitSelf } : { 
3231        debugName : string ; 
3332        multicodecs : string  |  string [ ] ; 
3433        libp2p : any ; 
35-         signMessages ?: boolean ; 
36-         strictSigning ?: boolean ; 
34+         globalSignaturePolicy ?: any ; 
3735        canRelayMessage ?: boolean ; 
3836        emitSelf ?: boolean ; 
3937    } ) ; 
@@ -66,12 +64,12 @@ declare class PubsubBaseProtocol {
6664     * @type  {Map<string, import('./peer-streams')> } 
6765     */ 
6866    peers : Map < string ,  import ( './peer-streams' ) > ; 
69-     signMessages : boolean ; 
7067    /** 
71-      * If message signing should be required for incoming messages 
72-      * @type  {boolean } 
68+      * The signature policy to follow by default 
69+      * 
70+      * @type  {string } 
7371     */ 
74-     strictSigning :  boolean ; 
72+     globalSignaturePolicy :  string ; 
7573    /** 
7674     * If router can relay received messages, even if not subscribed 
7775     * @type  {boolean } 
@@ -284,7 +282,7 @@ declare class PubsubBaseProtocol {
284282    getTopics ( ) : string [ ] ; 
285283} 
286284declare  namespace  PubsubBaseProtocol  { 
287-     export  {  message ,  utils ,  InMessage ,  PeerId  } ; 
285+     export  {  message ,  utils ,  SignaturePolicy ,   InMessage ,  PeerId  } ; 
288286} 
289287type  PeerId  =  import ( "peer-id" ) ; 
290288/** 
@@ -305,3 +303,7 @@ type InMessage = {
305303 */ 
306304declare  const  message : typeof  import ( './message' ) ; 
307305declare  const  utils : typeof  import ( "./utils" ) ; 
306+ declare  const  SignaturePolicy : { 
307+     StrictSign : string ; 
308+     StrictNoSign : string ; 
309+ } ; 
0 commit comments