mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-08 00:33:12 +00:00
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");
|
const log = debug("waku:relay");
|
||||||
|
|
||||||
export interface CreateOptions {
|
export type CreateOptions = {
|
||||||
/**
|
/**
|
||||||
* The PubSub Topic to use. Defaults to {@link DefaultPubSubTopic}.
|
* The PubSub Topic to use. Defaults to {@link DefaultPubSubTopic}.
|
||||||
*
|
*
|
||||||
@ -34,7 +34,7 @@ export interface CreateOptions {
|
|||||||
*/
|
*/
|
||||||
pubSubTopic?: string;
|
pubSubTopic?: string;
|
||||||
decryptionKeys?: Array<Uint8Array | string>;
|
decryptionKeys?: Array<Uint8Array | string>;
|
||||||
}
|
} & GossipsubOpts;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the [Waku v2 Relay protocol](https://rfc.vac.dev/spec/11/).
|
* 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>;
|
[contentTopic: string]: Set<(message: WakuMessage) => void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(options?: Partial<CreateOptions & GossipsubOpts>) {
|
constructor(options?: Partial<CreateOptions>) {
|
||||||
options = Object.assign(options ?? {}, {
|
options = Object.assign(options ?? {}, {
|
||||||
// Ensure that no signature is included nor expected in the messages.
|
// Ensure that no signature is included nor expected in the messages.
|
||||||
globalSignaturePolicy: SignaturePolicy.StrictNoSign,
|
globalSignaturePolicy: SignaturePolicy.StrictNoSign,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user