From 9f43c96911bf33a6383629c5e238322a74fafeb2 Mon Sep 17 00:00:00 2001 From: status-im-auto Date: Fri, 20 May 2022 00:49:17 +0000 Subject: [PATCH] Updates --- classes/discovery.Bootstrap.html | 2 +- classes/discovery.DnsOverHttps.html | 4 ++-- classes/discovery.ENRTree.html | 6 +++--- classes/discovery.dns.DnsNodeDiscovery.html | 8 ++++---- classes/enr.AbstractKeypair.html | 2 +- classes/enr.ENR.html | 20 +++++++++---------- classes/waku.Waku.html | 14 ++++++------- classes/waku_light_push.WakuLightPush.html | 6 +++--- classes/waku_message.WakuMessage.html | 12 +++++------ classes/waku_relay.WakuRelay.html | 18 ++++++++--------- classes/waku_store.WakuStore.html | 10 +++++----- enums/discovery.predefined.Fleet.html | 2 +- enums/enr.KeypairType.html | 2 +- enums/waku.Protocols.html | 2 +- enums/waku_message.DecryptionMethod.html | 2 +- enums/waku_store.PageDirection.html | 2 +- enums/waku_store.StoreCodecs.html | 2 +- interfaces/discovery.BootstrapOptions.html | 12 +++++------ interfaces/discovery.dns.DnsClient.html | 2 +- .../discovery.dns.NodeCapabilityCount.html | 2 +- interfaces/enr.IKeypair.html | 2 +- interfaces/enr.IKeypairClass.html | 2 +- interfaces/enr.Waku2.html | 2 +- interfaces/waku.CreateOptions.html | 12 +++++------ interfaces/waku_light_push.CreateOptions.html | 2 +- interfaces/waku_light_push.PushOptions.html | 2 +- interfaces/waku_light_push.PushResponse.html | 2 +- interfaces/waku_message.Options.html | 8 ++++---- interfaces/waku_relay.GossipOptions.html | 2 +- interfaces/waku_store.CreateOptions.html | 2 +- interfaces/waku_store.QueryOptions.html | 14 ++++++------- interfaces/waku_store.TimeFilter.html | 2 +- modules.html | 10 +++++----- modules/discovery.dns.html | 2 +- modules/discovery.html | 2 +- modules/discovery.predefined.html | 2 +- modules/enr.html | 4 ++-- modules/utils.html | 10 +++++----- modules/waku.html | 4 ++-- modules/waku_light_push.html | 2 +- modules/waku_relay.html | 2 +- modules/waku_store.html | 2 +- 42 files changed, 111 insertions(+), 111 deletions(-) diff --git a/classes/discovery.Bootstrap.html b/classes/discovery.Bootstrap.html index 677a97c917..a27a9f142d 100644 --- a/classes/discovery.Bootstrap.html +++ b/classes/discovery.Bootstrap.html @@ -1,4 +1,4 @@ Bootstrap | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Parse options and expose function to return bootstrap peer addresses.

throws

if an invalid combination of options is passed, see BootstrapOptions for details.

-

Hierarchy

  • Bootstrap

Index

Constructors

Properties

getBootstrapPeers: undefined | (() => Promise<Multiaddr[]>)
DefaultMaxPeers: number = 1

Generated using TypeDoc

\ No newline at end of file +

Hierarchy

Index

Constructors

Properties

getBootstrapPeers: undefined | (() => Promise<Multiaddr[]>)
DefaultMaxPeers: number = 1

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/discovery.DnsOverHttps.html b/classes/discovery.DnsOverHttps.html index 4c087d5ad5..189d649a85 100644 --- a/classes/discovery.DnsOverHttps.html +++ b/classes/discovery.DnsOverHttps.html @@ -1,11 +1,11 @@ -DnsOverHttps | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DnsOverHttps

Implements

Index

Constructors

Properties

Methods

Constructors

Properties

endpoints: Endpoints = ...

Methods

  • resolveTXT(domain: string): Promise<string[]>
  • Runs a recursive, randomized descent of the DNS tree to retrieve a single ENR record as an ENR. Returns null if parsing or DNS resolution fails.

    -

    Parameters

    Returns Promise<null | ENR>

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<ENR[]>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/enr.AbstractKeypair.html b/classes/enr.AbstractKeypair.html index 05bdda96be..8264e8f813 100644 --- a/classes/enr.AbstractKeypair.html +++ b/classes/enr.AbstractKeypair.html @@ -1 +1 @@ -AbstractKeypair | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractKeypair

Hierarchy

  • AbstractKeypair

Index

Constructors

  • new AbstractKeypair(privateKey?: Uint8Array, publicKey?: Uint8Array): AbstractKeypair

Properties

_privateKey?: Uint8Array
_publicKey?: Uint8Array

Accessors

  • get privateKey(): Uint8Array
  • get publicKey(): Uint8Array

Methods

  • hasPrivateKey(): boolean
  • privateKeyVerify(): boolean
  • publicKeyVerify(): boolean

Generated using TypeDoc

\ No newline at end of file +AbstractKeypair | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractKeypair

Hierarchy

  • AbstractKeypair

Index

Constructors

  • new AbstractKeypair(privateKey?: Uint8Array, publicKey?: Uint8Array): AbstractKeypair

Properties

_privateKey?: Uint8Array
_publicKey?: Uint8Array

Accessors

  • get privateKey(): Uint8Array
  • get publicKey(): Uint8Array

Methods

  • hasPrivateKey(): boolean
  • privateKeyVerify(): boolean
  • publicKeyVerify(): boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/enr.ENR.html b/classes/enr.ENR.html index 82681a062a..b99519acfc 100644 --- a/classes/enr.ENR.html +++ b/classes/enr.ENR.html @@ -1,4 +1,4 @@ -ENR | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ENR

Hierarchy

Index

Constructors

  • new ENR(kvs?: Record<string, Uint8Array>, seq?: bigint, signature?: null | Uint8Array): ENR
  • Parameters

    • kvs: Record<string, Uint8Array> = {}
    • seq: bigint = ...
    • signature: null | Uint8Array = null

    Returns ENR

Properties

[toStringTag]: string
peerId?: PeerId
seq: bigint
signature: null | Uint8Array
size: number
RECORD_PREFIX: "enr:" = "enr:"
[species]: MapConstructor

Accessors

  • get id(): string
  • get ip(): undefined | string
  • set ip(ip: undefined | string): void
  • get ip6(): undefined | string
  • set ip6(ip: undefined | string): void
  • get multiaddrs(): undefined | Multiaddr[]
  • set multiaddrs(multiaddrs: undefined | Multiaddr[]): void
  • +ENR | js-waku
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ENR

    Hierarchy

    Index

    Constructors

    • new ENR(kvs?: Record<string, Uint8Array>, seq?: bigint, signature?: null | Uint8Array): ENR
    • Parameters

      • kvs: Record<string, Uint8Array> = {}
      • seq: bigint = ...
      • signature: null | Uint8Array = null

      Returns ENR

    Properties

    [toStringTag]: string
    peerId?: PeerId
    seq: bigint
    signature: null | Uint8Array
    size: number
    RECORD_PREFIX: "enr:" = "enr:"
    [species]: MapConstructor

    Accessors

    • get id(): string
    • get ip(): undefined | string
    • set ip(ip: undefined | string): void
    • get ip6(): undefined | string
    • set ip6(ip: undefined | string): void
    • get multiaddrs(): undefined | Multiaddr[]
    • set multiaddrs(multiaddrs: undefined | Multiaddr[]): void
    • Get the multiaddrs field from ENR.

      This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys. These can be a multiaddresses that include encapsulation (e.g. wss) or do not use ip4 nor ip6 for the host @@ -6,7 +6,7 @@ address (e.g. dns4, dnsaddr, etc)..

      If the peer information only contains information that can be represented with the ENR pre-defined keys (ip, tcp, etc) then the usage of getLocationMultiaddr should be preferred.

      The multiaddresses stored in this field are expected to be location multiaddresses, ie, peer id less.

      -

      Returns undefined | Multiaddr[]

    • +

      Returns undefined | Multiaddr[]

    • Set the multiaddrs field on the ENR.

      This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys. These can be a multiaddresses that include encapsulation (e.g. wss) or do not use ip4 nor ip6 for the host @@ -15,24 +15,24 @@ address (e.g. dns4, dnsaddr, etc)..

      (ip, tcp, etc) then the usage of setLocationMultiaddr should be preferred. The multiaddresses stored in this field must be location multiaddresses, ie, without a peer id.

      -

      Parameters

      • multiaddrs: undefined | Multiaddr[]

      Returns void

    • get nodeId(): undefined | string
    • get publicKey(): undefined | Uint8Array
    • get tcp(): undefined | number
    • set tcp(port: undefined | number): void
    • get tcp6(): undefined | number
    • set tcp6(port: undefined | number): void
    • get udp(): undefined | number
    • set udp(port: undefined | number): void
    • get udp6(): undefined | number
    • set udp6(port: undefined | number): void
    • get waku2(): undefined | Waku2
    • set waku2(waku2: undefined | Waku2): void
    • get nodeId(): undefined | string
    • get publicKey(): undefined | Uint8Array
    • get tcp(): undefined | number
    • set tcp(port: undefined | number): void
    • get tcp6(): undefined | number
    • set tcp6(port: undefined | number): void
    • get udp(): undefined | number
    • set udp(port: undefined | number): void
    • get udp6(): undefined | number
    • set udp6(port: undefined | number): void
    • get waku2(): undefined | Waku2
    • set waku2(waku2: undefined | Waku2): void

    Methods

    • [iterator](): IterableIterator<[string, Uint8Array]>
    • Returns an iterable of entries in the map.

      -

      Returns IterableIterator<[string, Uint8Array]>

    • clear(): void
    • Returns void

    • delete(key: string): boolean
    • Parameters

      • key: string

      Returns boolean

    • encode(privateKey?: Uint8Array): Promise<Uint8Array>
    • encodeToValues(privateKey?: Uint8Array): Promise<(string | Uint8Array | number[])[]>
    • Parameters

      • Optional privateKey: Uint8Array

      Returns Promise<(string | Uint8Array | number[])[]>

    • encodeTxt(privateKey?: Uint8Array): Promise<string>
    • entries(): IterableIterator<[string, Uint8Array]>
    • +

      Returns IterableIterator<[string, Uint8Array]>

    • clear(): void
    • Returns void

    • delete(key: string): boolean
    • Parameters

      • key: string

      Returns boolean

    • encode(privateKey?: Uint8Array): Promise<Uint8Array>
    • encodeToValues(privateKey?: Uint8Array): Promise<(string | Uint8Array | number[])[]>
    • Parameters

      • Optional privateKey: Uint8Array

      Returns Promise<(string | Uint8Array | number[])[]>

    • encodeTxt(privateKey?: Uint8Array): Promise<string>
    • entries(): IterableIterator<[string, Uint8Array]>
    • Returns an iterable of key, value pairs for every entry in the map.

      -

      Returns IterableIterator<[string, Uint8Array]>

    • forEach(callbackfn: (value: Uint8Array, key: string, map: Map<string, Uint8Array>) => void, thisArg?: any): void
    • Parameters

      • callbackfn: (value: Uint8Array, key: string, map: Map<string, Uint8Array>) => void
          • (value: Uint8Array, key: string, map: Map<string, Uint8Array>): void
          • Parameters

            • value: Uint8Array
            • key: string
            • map: Map<string, Uint8Array>

            Returns void

      • Optional thisArg: any

      Returns void

    • get(key: string): undefined | Uint8Array
    • Parameters

      • key: string

      Returns undefined | Uint8Array

    • getFullMultiaddr(protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"): undefined | Multiaddr
    • forEach(callbackfn: (value: Uint8Array, key: string, map: Map<string, Uint8Array>) => void, thisArg?: any): void
    • Parameters

      • callbackfn: (value: Uint8Array, key: string, map: Map<string, Uint8Array>) => void
          • (value: Uint8Array, key: string, map: Map<string, Uint8Array>): void
          • Parameters

            • value: Uint8Array
            • key: string
            • map: Map<string, Uint8Array>

            Returns void

      • Optional thisArg: any

      Returns void

    • get(key: string): undefined | Uint8Array
    • Parameters

      • key: string

      Returns undefined | Uint8Array

    • getFullMultiaddr(protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"): undefined | Multiaddr
    • Returns the full multiaddr from the ENR fields matching the provided protocol parameter. To return full multiaddrs from the multiaddrs ENR field, use ENR.getFullMultiaddrs

      Parameters

      • protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"
        -

      Returns undefined | Multiaddr

    • getFullMultiaddrs(): Multiaddr[]

    Returns undefined | Multiaddr

  • getFullMultiaddrs(): Multiaddr[]
  • Returns the full multiaddrs from the multiaddrs ENR field.

    -

    Returns Multiaddr[]

  • getLocationMultiaddr(protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"): undefined | Multiaddr
  • Parameters

    • protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"

    Returns undefined | Multiaddr

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

  • keys(): IterableIterator<string>
  • +

    Returns Multiaddr[]

  • getLocationMultiaddr(protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"): undefined | Multiaddr
  • Parameters

    • protocol: "udp" | "udp4" | "udp6" | "tcp" | "tcp4" | "tcp6"

    Returns undefined | Multiaddr

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

  • keys(): IterableIterator<string>
  • Returns an iterable of keys in the map

    -

    Returns IterableIterator<string>

  • set(k: string, v: Uint8Array): ENR
  • setLocationMultiaddr(multiaddr: Multiaddr): void
  • sign(data: Uint8Array, privateKey: Uint8Array): Promise<Uint8Array>
  • values(): IterableIterator<Uint8Array>
  • +

    Returns IterableIterator<string>

  • set(k: string, v: Uint8Array): ENR
  • setLocationMultiaddr(multiaddr: Multiaddr): void
  • sign(data: Uint8Array, privateKey: Uint8Array): Promise<Uint8Array>
  • values(): IterableIterator<Uint8Array>
  • Returns an iterable of values in the map

    -

    Returns IterableIterator<Uint8Array>

  • verify(data: Uint8Array, signature: Uint8Array): boolean
  • create(kvs?: Record<string, Uint8Array>, seq?: bigint, signature?: null | Uint8Array): Promise<ENR>
  • Parameters

    • kvs: Record<string, Uint8Array> = {}
    • seq: bigint = ...
    • signature: null | Uint8Array = null

    Returns Promise<ENR>

  • createFromPeerId(peerId: PeerId, kvs?: Record<string, Uint8Array>): Promise<ENR>
  • createV4(publicKey: Uint8Array, kvs?: Record<string, Uint8Array>): Promise<ENR>
  • decode(encoded: Uint8Array): Promise<ENR>
  • decodeFromValues(decoded: Uint8Array[]): Promise<ENR>
  • decodeTxt(encoded: string): Promise<ENR>

Generated using TypeDoc

\ No newline at end of file +

Returns IterableIterator<Uint8Array>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/waku.Waku.html b/classes/waku.Waku.html index c272085676..8440699fb5 100644 --- a/classes/waku.Waku.html +++ b/classes/waku.Waku.html @@ -1,24 +1,24 @@ -Waku | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Waku

Hierarchy

  • Waku

Index

Constructors

Properties

libp2p: Libp2p
lightPush: WakuLightPush
pingKeepAliveTimers: {}

Type declaration

  • [peer: string]: ReturnType<typeof setInterval>
relay: WakuRelay
relayKeepAliveTimers: {}

Type declaration

  • [peer: string]: ReturnType<typeof setInterval>
store: WakuStore

Methods

  • addDecryptionKey(key: string | Uint8Array, options?: { contentTopics?: string[]; method?: DecryptionMethod }): void
  • getLocalMultiaddrWithID(): string
  • Return the local multiaddr with peer id on which libp2p is listening.

    throws

    if libp2p is not listening on localhost.

    -

    Returns string

  • startKeepAlive(peerId: PeerId, pingPeriodSecs: number, relayPeriodSecs: number): void
  • Parameters

    • peerId: PeerId
    • pingPeriodSecs: number
    • relayPeriodSecs: number

    Returns void

  • stop(): Promise<void>
  • stopKeepAlive(peerId: PeerId): void
  • waitForRemotePeer(protocols?: Protocols[], timeoutMs?: number): Promise<void>
  • startKeepAlive(peerId: PeerId, pingPeriodSecs: number, relayPeriodSecs: number): void
  • Parameters

    • peerId: PeerId
    • pingPeriodSecs: number
    • relayPeriodSecs: number

    Returns void

  • stop(): Promise<void>
  • stopKeepAlive(peerId: PeerId): void
  • waitForRemotePeer(protocols?: Protocols[], timeoutMs?: number): Promise<void>

Returns Promise<void>

A promise that resolves if all desired protocols are fulfilled by remote nodes, rejects if the timeoutMs is reached.

-

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/waku_light_push.WakuLightPush.html b/classes/waku_light_push.WakuLightPush.html index 6bd839cc73..daef917988 100644 --- a/classes/waku_light_push.WakuLightPush.html +++ b/classes/waku_light_push.WakuLightPush.html @@ -1,10 +1,10 @@ WakuLightPush | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Implements the Waku v2 Light Push protocol.

-

Hierarchy

  • WakuLightPush

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

libp2p: Libp2p
pubSubTopic: string

Accessors

  • get peers(): AsyncIterable<Peer>

Hierarchy

  • WakuLightPush

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

libp2p: Libp2p
pubSubTopic: string

Accessors

  • get peers(): AsyncIterable<Peer>
  • Returns known peers from the address book (libp2p.peerStore) that support light push protocol. Waku may or may not be currently connected to these peers.

    -

    Returns AsyncIterable<Peer>

  • get randomPeer(): Promise<undefined | Peer>
  • get randomPeer(): Promise<undefined | Peer>
  • Returns a random peer that supports light push protocol from the address book (libp2p.peerStore). Waku may or may not be currently connected to this peer.

    -

    Returns Promise<undefined | Peer>

Methods

Generated using TypeDoc

\ No newline at end of file +

Returns Promise<undefined | Peer>

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/waku_message.WakuMessage.html b/classes/waku_message.WakuMessage.html index 0a0a9bb2a2..cf089af32f 100644 --- a/classes/waku_message.WakuMessage.html +++ b/classes/waku_message.WakuMessage.html @@ -1,24 +1,24 @@ -WakuMessage | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • WakuMessage

Index

Constructors

  • new WakuMessage(proto: WakuMessage, _signaturePublicKey?: Uint8Array, _signature?: Uint8Array): WakuMessage

Properties

proto: WakuMessage

Accessors

  • get contentTopic(): undefined | string
  • get payload(): undefined | Uint8Array
  • get payloadAsUtf8(): string
  • get signature(): undefined | Uint8Array

Hierarchy

  • Gossipsub
    • WakuRelay

Index

Constructors

Properties

decryptionKeys: Map<Uint8Array, { contentTopics?: string[]; method?: DecryptionMethod }>
heartbeat: RelayHeartbeat
observers: {}
+

Hierarchy

  • Gossipsub
    • WakuRelay

Index

Constructors

Properties

decryptionKeys: Map<Uint8Array, { contentTopics?: string[]; method?: DecryptionMethod }>
heartbeat: RelayHeartbeat
observers: {}

observers called when receiving new message. Observers under key "" are always called.

-

Type declaration

  • [contentTopic: string]: Set<(message: WakuMessage) => void>
pubSubTopic: string

Methods

  • addDecryptionKey(key: string | Uint8Array, options?: { contentTopics?: string[]; method?: DecryptionMethod }): void
pubSubTopic: string

Methods

  • addDecryptionKey(key: string | Uint8Array, options?: { contentTopics?: string[]; method?: DecryptionMethod }): void
  • Register a decryption key to attempt decryption of received messages. This can either be a private key for asymmetric encryption or a symmetric key. WakuRelay will attempt to decrypt messages using both methods.

    Strings must be in hex format.

    -

    Parameters

    • key: string | Uint8Array
    • Optional options: { contentTopics?: string[]; method?: DecryptionMethod }

    Returns void

  • addObserver(callback: (message: WakuMessage) => void, contentTopics?: string[]): void
  • addObserver(callback: (message: WakuMessage) => void, contentTopics?: string[]): void
  • Register an observer of new messages received via waku relay

    Parameters

    • callback: (message: WakuMessage) => void

      called when a new message is received via waku relay

    • contentTopics: string[] = []

      Content Topics for which the callback with be called, all of them if undefined, [] or ["",..] is passed.

      -

    Returns void

  • deleteDecryptionKey(key: string | Uint8Array): void

Returns void

  • deleteDecryptionKey(key: string | Uint8Array): void
  • Delete a decryption key that was used to attempt decryption of received messages.

    Strings must be in hex format.

    -

    Parameters

    • key: string | Uint8Array

    Returns void

  • deleteObserver(callback: (message: WakuMessage) => void, contentTopics?: string[]): void
  • deleteObserver(callback: (message: WakuMessage) => void, contentTopics?: string[]): void
  • Remove an observer of new messages received via waku relay. Useful to ensure the same observer is not registered several time (e.g when loading React components)

    -

    Parameters

    Returns void

  • getPeers(): Set<string>
  • getPeers(): Set<string>
  • start(): Promise<void>
  • start(): Promise<void>
  • Mounts the gossipsub protocol onto the libp2p node and subscribes to the default topic.

    -
    override

    Returns Promise<void>

  • subscribe(pubSubTopic: string): void
  • subscribe(pubSubTopic: string): void
  • Subscribe to a pubsub topic and start emitting Waku messages to observers.

    override

    Parameters

    • pubSubTopic: string

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/waku_store.WakuStore.html b/classes/waku_store.WakuStore.html index 4d99ce8940..de1b212001 100644 --- a/classes/waku_store.WakuStore.html +++ b/classes/waku_store.WakuStore.html @@ -1,25 +1,25 @@ WakuStore | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Implements the Waku v2 Store protocol.

The Waku Store protocol can be used to retrieved historical messages.

-

Hierarchy

  • WakuStore

Index

Constructors

Properties

decryptionKeys: Map<Uint8Array, { contentTopics?: string[]; method?: DecryptionMethod }>
libp2p: Libp2p
pubSubTopic: string

Accessors

  • get peers(): AsyncIterable<Peer>

Hierarchy

  • WakuStore

Index

Constructors

Properties

decryptionKeys: Map<Uint8Array, { contentTopics?: string[]; method?: DecryptionMethod }>
libp2p: Libp2p
pubSubTopic: string

Accessors

  • get peers(): AsyncIterable<Peer>
  • Returns known peers from the address book (libp2p.peerStore) that support store protocol. Waku may or may not be currently connected to these peers.

    -

    Returns AsyncIterable<Peer>

  • get randomPeer(): Promise<undefined | Peer>
  • get randomPeer(): Promise<undefined | Peer>
  • Returns a random peer that supports store protocol from the address book (libp2p.peerStore). Waku may or may not be currently connected to this peer.

    -

    Returns Promise<undefined | Peer>

Methods

  • addDecryptionKey(key: string | Uint8Array, options?: { contentTopics?: string[]; method?: DecryptionMethod }): void

Methods

  • addDecryptionKey(key: string | Uint8Array, options?: { contentTopics?: string[]; method?: DecryptionMethod }): void
  • Register a decryption key to attempt decryption of messages received in any subsequent queryHistory call. This can either be a private key for asymmetric encryption or a symmetric key. WakuStore will attempt to decrypt messages using both methods.

    Strings must be in hex format.

    -

    Parameters

    • key: string | Uint8Array
    • Optional options: { contentTopics?: string[]; method?: DecryptionMethod }

    Returns void

  • deleteDecryptionKey(key: string | Uint8Array): void
  • deleteDecryptionKey(key: string | Uint8Array): void
  • cursorV2Beta4 Delete a decryption key that was used to attempt decryption of messages received in subsequent queryHistory calls.

    Strings must be in hex format.

    -

    Parameters

    • key: string | Uint8Array

    Returns void

enrUrl?: string

An EIP-1459 ENR Tree URL. For example: "enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"

wantedNodeCapabilityCount MUST be passed when using this option.

-
maxPeers?: number
+
maxPeers?: number

The maximum of peers to connect to as part of the bootstrap process. This only applies if peers or getPeers is used.

default

Bootstrap.DefaultMaxPeers

-
peers?: Multiaddr[] | string[]
+
peers?: Multiaddr[] | string[]

Multiaddrs of peers to connect to.

-
wantedNodeCapabilityCount?: Partial<NodeCapabilityCount>
+
wantedNodeCapabilityCount?: Partial<NodeCapabilityCount>

Specifies what node capabilities (protocol) must be returned. This only applies when enrUrl is passed (EIP-1459 DNS Discovery).

-

Methods

  • getPeers(): Promise<Multiaddr[] | string[]>

Methods

  • getPeers(): Promise<Multiaddr[] | string[]>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/discovery.dns.DnsClient.html b/interfaces/discovery.dns.DnsClient.html index a0a90f018d..1777d20fe5 100644 --- a/interfaces/discovery.dns.DnsClient.html +++ b/interfaces/discovery.dns.DnsClient.html @@ -1 +1 @@ -DnsClient | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DnsClient

Hierarchy

  • DnsClient

Implemented by

Index

Methods

Methods

  • resolveTXT(domain: string): Promise<string[]>

Generated using TypeDoc

\ No newline at end of file +DnsClient | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DnsClient

Hierarchy

  • DnsClient

Implemented by

Index

Methods

Methods

  • resolveTXT(domain: string): Promise<string[]>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/discovery.dns.NodeCapabilityCount.html b/interfaces/discovery.dns.NodeCapabilityCount.html index 1106d1e964..425e990ea2 100644 --- a/interfaces/discovery.dns.NodeCapabilityCount.html +++ b/interfaces/discovery.dns.NodeCapabilityCount.html @@ -1 +1 @@ -NodeCapabilityCount | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NodeCapabilityCount

Hierarchy

  • NodeCapabilityCount

Index

Properties

filter: number
lightPush: number
relay: number
store: number

Generated using TypeDoc

\ No newline at end of file +NodeCapabilityCount | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NodeCapabilityCount

Hierarchy

  • NodeCapabilityCount

Index

Properties

filter: number
lightPush: number
relay: number
store: number

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/enr.IKeypair.html b/interfaces/enr.IKeypair.html index 960e8da815..328e8286c8 100644 --- a/interfaces/enr.IKeypair.html +++ b/interfaces/enr.IKeypair.html @@ -1 +1 @@ -IKeypair | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IKeypair

Hierarchy

  • IKeypair

Index

Properties

privateKey: Uint8Array
publicKey: Uint8Array

Methods

  • hasPrivateKey(): boolean
  • privateKeyVerify(): boolean
  • publicKeyVerify(): boolean
  • sign(msg: Uint8Array): Promise<Uint8Array>
  • verify(msg: Uint8Array, sig: Uint8Array): boolean

Generated using TypeDoc

\ No newline at end of file +IKeypair | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IKeypair

Hierarchy

  • IKeypair

Index

Properties

privateKey: Uint8Array
publicKey: Uint8Array

Methods

  • hasPrivateKey(): boolean
  • privateKeyVerify(): boolean
  • publicKeyVerify(): boolean
  • sign(msg: Uint8Array): Promise<Uint8Array>
  • verify(msg: Uint8Array, sig: Uint8Array): boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/enr.IKeypairClass.html b/interfaces/enr.IKeypairClass.html index 14f864504e..20aa0b465e 100644 --- a/interfaces/enr.IKeypairClass.html +++ b/interfaces/enr.IKeypairClass.html @@ -1 +1 @@ -IKeypairClass | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IKeypairClass

Hierarchy

  • IKeypairClass

Index

Constructors

Methods

Constructors

  • new IKeypairClass(privateKey?: Uint8Array, publicKey?: Uint8Array): IKeypair

Methods

Generated using TypeDoc

\ No newline at end of file +IKeypairClass | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IKeypairClass

Hierarchy

  • IKeypairClass

Index

Constructors

Methods

Constructors

  • new IKeypairClass(privateKey?: Uint8Array, publicKey?: Uint8Array): IKeypair

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/enr.Waku2.html b/interfaces/enr.Waku2.html index a9a61a2170..002123b378 100644 --- a/interfaces/enr.Waku2.html +++ b/interfaces/enr.Waku2.html @@ -1 +1 @@ -Waku2 | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Waku2

Hierarchy

  • Waku2

Index

Properties

filter: boolean
lightPush: boolean
relay: boolean
store: boolean

Generated using TypeDoc

\ No newline at end of file +Waku2 | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Waku2

Hierarchy

  • Waku2

Index

Properties

filter: boolean
lightPush: boolean
relay: boolean
store: boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/waku.CreateOptions.html b/interfaces/waku.CreateOptions.html index cf3a48f42d..9c9ce94fc1 100644 --- a/interfaces/waku.CreateOptions.html +++ b/interfaces/waku.CreateOptions.html @@ -1,19 +1,19 @@ -CreateOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateOptions

Hierarchy

  • CreateOptions

Index

Properties

bootstrap?: BootstrapOptions
+CreateOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateOptions

Hierarchy

  • CreateOptions

Index

Properties

bootstrap?: BootstrapOptions

Use libp2p-bootstrap to discover and connect to new nodes.

See BootstrapOptions for available parameters.

Note: It overrides any other peerDiscovery modules that may have been set via CreateOptions.libp2p.

-
decryptionKeys?: (string | Uint8Array)[]
libp2p?: Omit<Libp2pOptions & CreateOptions, "modules"> & { modules?: Partial<Libp2pModules> }
+
decryptionKeys?: (string | Uint8Array)[]
libp2p?: Omit<Libp2pOptions & CreateOptions, "modules"> & { modules?: Partial<Libp2pModules> }

You can pass options to the Libp2p instance used by Waku using the CreateOptions.libp2p property. This property is the same type than the one passed to Libp2p.create apart that we made the modules property optional and partial, allowing its omission and letting Waku set good defaults. Notes that some values are overridden by Waku to ensure it implements the Waku protocol.

-
pingKeepAlive?: number
+
pingKeepAlive?: number

Set keep alive frequency in seconds: Waku will send a /ipfs/ping/1.0.0 request to each peer after the set number of seconds. Set to 0 to disable.

default

DefaultPingKeepAliveValueSecs

-
pubSubTopic?: string
+
pubSubTopic?: string

The PubSub Topic to use. Defaults to DefaultPubSubTopic.

One and only one pubsub topic is used by Waku. This is used by:

    @@ -24,11 +24,11 @@ request to each peer after the set number of seconds. Set to 0 to disable.

    The usage of the default pubsub topic is recommended. See Waku v2 Topic Usage Recommendations for details.

default

DefaultPubSubTopic

-
relayKeepAlive?: number
+
relayKeepAlive?: number

Set keep alive frequency in seconds: Waku will send a ping message over relay to each peer after the set number of seconds. Set to 0 to disable.

default

DefaultRelayKeepAliveValueSecs

-
staticNoiseKey?: Uint8Array
+
staticNoiseKey?: Uint8Array

Byte array used as key for the noise protocol used for connection encryption by Libp2p.create This is only used for test purposes to not run out of entropy during CI runs.

diff --git a/interfaces/waku_light_push.CreateOptions.html b/interfaces/waku_light_push.CreateOptions.html index 322e2b93f3..4aad3c2829 100644 --- a/interfaces/waku_light_push.CreateOptions.html +++ b/interfaces/waku_light_push.CreateOptions.html @@ -1,4 +1,4 @@ -CreateOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CreateOptions

Index

Properties

Properties

pubSubTopic?: string
+CreateOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CreateOptions

Index

Properties

Properties

pubSubTopic?: string

The PubSub Topic to use. Defaults to DefaultPubSubTopic.

The usage of the default pubsub topic is recommended. See Waku v2 Topic Usage Recommendations for details.

diff --git a/interfaces/waku_light_push.PushOptions.html b/interfaces/waku_light_push.PushOptions.html index 4a57f99765..e2c5494602 100644 --- a/interfaces/waku_light_push.PushOptions.html +++ b/interfaces/waku_light_push.PushOptions.html @@ -1 +1 @@ -PushOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PushOptions

Index

Properties

peerId?: PeerId
pubSubTopic?: string

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +PushOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PushOptions

Index

Properties

peerId?: PeerId
pubSubTopic?: string

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/waku_light_push.PushResponse.html b/interfaces/waku_light_push.PushResponse.html index b300c20137..2fa92feaf9 100644 --- a/interfaces/waku_light_push.PushResponse.html +++ b/interfaces/waku_light_push.PushResponse.html @@ -1 +1 @@ -PushResponse | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +PushResponse | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/waku_message.Options.html b/interfaces/waku_message.Options.html index 3ba4de27e4..82a4950b59 100644 --- a/interfaces/waku_message.Options.html +++ b/interfaces/waku_message.Options.html @@ -1,12 +1,12 @@ -Options | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Options

Index

Properties

encPublicKey?: string | Uint8Array
+Options | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Options

Index

Properties

encPublicKey?: string | Uint8Array

Public Key to use to encrypt the messages using ECIES (Asymmetric Encryption).

throws

if both encPublicKey and symKey are passed

-
sigPrivKey?: Uint8Array
+
sigPrivKey?: Uint8Array

Private key to use to sign the message, either encPublicKey or symKey must be provided as only encrypted messages are signed.

-
symKey?: string | Uint8Array
+
symKey?: string | Uint8Array

Key to use to encrypt the messages using AES (Symmetric Encryption).

throws

if both encPublicKey and symKey are passed

-
timestamp?: Date
+
timestamp?: Date

Timestamp to set on the message, defaults to now if not passed.

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/waku_relay.GossipOptions.html b/interfaces/waku_relay.GossipOptions.html index f56e50acf5..535da8a99d 100644 --- a/interfaces/waku_relay.GossipOptions.html +++ b/interfaces/waku_relay.GossipOptions.html @@ -1,3 +1,3 @@ GossipOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GossipOptions

See constructor libp2p-gossipsub API.

-

Hierarchy

  • GossipOptions

Index

Properties

D: number
Dhi: number
Dlazy: number
Dlo: number
Dout: number
Dscore: number
directPeers: AddrInfo[]
doPX: boolean
emitSelf: boolean
fallbackToFloodsub: boolean
floodPublish: boolean
gossipIncoming: boolean
messageCache: MessageCache
msgIdFn: MessageIdFunction
scoreParams: Partial<PeerScoreParams>
scoreThresholds: Partial<PeerScoreThresholds>

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +

Hierarchy

  • GossipOptions

Index

Properties

D: number
Dhi: number
Dlazy: number
Dlo: number
Dout: number
Dscore: number
directPeers: AddrInfo[]
doPX: boolean
emitSelf: boolean
fallbackToFloodsub: boolean
floodPublish: boolean
gossipIncoming: boolean
messageCache: MessageCache
msgIdFn: MessageIdFunction
scoreParams: Partial<PeerScoreParams>
scoreThresholds: Partial<PeerScoreThresholds>

Legend

  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/waku_store.CreateOptions.html b/interfaces/waku_store.CreateOptions.html index 65a07f8b4a..8a2558bb22 100644 --- a/interfaces/waku_store.CreateOptions.html +++ b/interfaces/waku_store.CreateOptions.html @@ -1,4 +1,4 @@ -CreateOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateOptions

Hierarchy

  • CreateOptions

Index

Properties

Properties

pubSubTopic?: string
+CreateOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateOptions

Hierarchy

  • CreateOptions

Index

Properties

Properties

pubSubTopic?: string

The PubSub Topic to use. Defaults to DefaultPubSubTopic.

The usage of the default pubsub topic is recommended. See Waku v2 Topic Usage Recommendations for details.

diff --git a/interfaces/waku_store.QueryOptions.html b/interfaces/waku_store.QueryOptions.html index 79b9ec19e1..00ed6962e3 100644 --- a/interfaces/waku_store.QueryOptions.html +++ b/interfaces/waku_store.QueryOptions.html @@ -1,8 +1,8 @@ -QueryOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface QueryOptions

Hierarchy

  • QueryOptions

Index

Properties

decryptionKeys?: (string | Uint8Array)[]
+QueryOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface QueryOptions

Hierarchy

  • QueryOptions

Index

Properties

decryptionKeys?: (string | Uint8Array)[]

Keys that will be used to decrypt messages.

It can be Asymmetric Private Keys and Symmetric Keys in the same array, all keys will be tried with both methods.

-
pageDirection?: PageDirection
+
pageDirection?: PageDirection

The direction in which pages are retrieved:

  • PageDirection.BACKWARD: Most recent page first.
  • @@ -11,17 +11,17 @@ all keys will be tried with both methods.

Note: This does not affect the ordering of messages with the page (oldest message is always first).

default

PageDirection.BACKWARD

-
pageSize?: number
+
pageSize?: number

The number of message per page.

default

DefaultPageSize

-
peerId?: PeerId
+
peerId?: PeerId

The peer to query. If undefined, a pseudo-random peer is selected from the connected Waku Store peers.

-
pubSubTopic?: string
+
pubSubTopic?: string

The pubsub topic to pass to the query. See Waku v2 Topic Usage Recommendations.

-
timeFilter?: TimeFilter
+
timeFilter?: TimeFilter

Retrieve messages with a timestamp within the provided values.

-

Methods

Methods