mirror of https://github.com/waku-org/js-waku.git
feat: merge gossipsub type in CreateOptions interface
This commit is contained in:
parent
a54494dbbf
commit
aee054d9d6
|
@ -18,7 +18,7 @@ import * as constants from "./constants";
|
|||
|
||||
const log = debug("waku:relay");
|
||||
|
||||
export interface CreateOptions {
|
||||
export type CreateOptions = {
|
||||
/**
|
||||
* The PubSub Topic to use. Defaults to {@link DefaultPubSubTopic}.
|
||||
*
|
||||
|
@ -34,7 +34,7 @@ export interface CreateOptions {
|
|||
*/
|
||||
pubSubTopic?: string;
|
||||
decryptionKeys?: Array<Uint8Array | string>;
|
||||
}
|
||||
} & GossipsubOpts;
|
||||
|
||||
/**
|
||||
* Implements the [Waku v2 Relay protocol](https://rfc.vac.dev/spec/11/).
|
||||
|
@ -59,7 +59,7 @@ export class WakuRelay extends GossipSub {
|
|||
[contentTopic: string]: Set<(message: WakuMessage) => void>;
|
||||
};
|
||||
|
||||
constructor(options?: Partial<CreateOptions & GossipsubOpts>) {
|
||||
constructor(options?: Partial<CreateOptions>) {
|
||||
options = Object.assign(options ?? {}, {
|
||||
// Ensure that no signature is included nor expected in the messages.
|
||||
globalSignaturePolicy: SignaturePolicy.StrictNoSign,
|
||||
|
|
Loading…
Reference in New Issue