From 954d8a51fb9c0be4d15e45e86d4385abaa9e626d Mon Sep 17 00:00:00 2001
From: status-im-auto
+
@@ -73,29 +73,29 @@
Optional
options: Partial<ConnectionManagerOptions>Returns ConnectionManager
Properties
Private
dialPrivate
dialPrivate
keepPrivate
libp2pPrivate
on
peer:connect: ((evt: CustomEvent<Connection>) => void);
peer:disconnect: (() => ((evt: CustomEvent<Connection>) => void));
peer:discovery: ((evt: CustomEvent<PeerInfo>) => Promise<void>);
} = ...evt: CustomEvent<PeerInfo>
Returns Promise<void>
Private
optionsStatic
Private
instancesMethods
peerId: PeerId
Returns Promise<void>
Private
get
@@ -188,7 +188,7 @@
peerId: PeerId
Returns Promise<string[]>
Private
run
@@ -196,7 +196,7 @@
Returns Promise<void>
Private
should
@@ -215,7 +215,7 @@
peerId: PeerId
Returns Promise<boolean>
Private
start
@@ -223,7 +223,7 @@
Returns void
Private
start
@@ -231,7 +231,7 @@
Returns void
Private
start
@@ -239,7 +239,7 @@
Returns void
stop
@@ -247,7 +247,7 @@
Returns void
Static
create
@@ -268,7 +268,7 @@
Optional
options: ConnectionManagerOptionsReturns ConnectionManager
Returns void
+stop
@@ -138,7 +138,7 @@
Returns void
Returns string
+is
@@ -203,7 +203,7 @@
Returns boolean
start
@@ -212,7 +212,7 @@
Returns Promise<void>
stop
@@ -221,7 +221,7 @@
Returns Promise<void>
Private
Readonly
_errorPrivate
Readonly
dnsMethods
Private
_searchStatic
dnsOptional
dnsClient: DnsClientOptional
peerOptional
signatureStatic
Readonly
RECORD_Inherited from RawEnr.id
Inherited from RawEnr.ip
Inherited from RawEnr.ip
Inherited from RawEnr.ip6
Inherited from RawEnr.ip6
dns4
, dnsaddr
, etc)..
Implementation of IEnr.multiaddrs
Inherited from RawEnr.multiaddrs
Set the multiaddrs
field on the ENR.
Implementation of IEnr.multiaddrs
Inherited from RawEnr.multiaddrs
Implementation of IEnr.publicKey
Inherited from RawEnr.publicKey
Inherited from RawEnr.tcp
Inherited from RawEnr.tcp
Inherited from RawEnr.tcp6
Inherited from RawEnr.tcp6
Inherited from RawEnr.udp
Inherited from RawEnr.udp
Inherited from RawEnr.udp6
Inherited from RawEnr.udp6
Inherited from RawEnr.waku2
Set the waku2
field on the ENR.
Inherited from RawEnr.waku2
Implementation of IEnr.set
Static
createOptional
signature: Uint8ArraySet the waku2
field on the ENR.
Private
queryPrivate
Readonly
startOptional
userOptional
pageOptional
peerThe peer to query. If undefined, a pseudo-random peer is selected from the connected Waku Store peers.
Optional
timeRetrieve messages with a timestamp within the provided values.
Optional
opts: ProtocolOptionsOptional
options: StoreQueryOptionsOptional
options: StoreQueryOptionsReadonly
gossipSymmetric encryption uses a unique key to encrypt and decrypt messages.
-import {
createDecoder,
createEncoder,
generateSymmetricKey,
} from "@waku/message-encryption/symmetric";
// Generate a random key
const key = generateSymmetricKey();
// To send messages, create an encoder
const encoder = createEncoder(contentTopic, key);
// For example
waku.lightPush.push(encoder, { payload });
// To receive messages, create a decoder
const decoder = createDecoder(contentTopic, key);
// For example
await waku.store.queryOrderedCallback([decoder], (msg) => {
// ...
});
+import {
createDecoder,
createEncoder,
generateSymmetricKey,
} from "@waku/message-encryption/symmetric";
// Generate a random key
const key = generateSymmetricKey();
// To send messages, create an encoder
const encoder = createEncoder(contentTopic, key);
// For example
waku.lightPush.push(encoder, { payload });
// To receive messages, create a decoder
const decoder = createDecoder(contentTopic, key);
// For example
await waku.store.queryOrderedCallback([decoder], (msg) => {
// ...
});
ECIES Encryption
ECIES encryption enables encryption for a public key and decryption using a private key.
-import {
createDecoder,
createEncoder,
generatePrivateKey,
getPublicKey,
} from "@waku/message-encryption/ecies";
// Generate a random private key
const privateKey = generatePrivateKey();
// Keep the private key secure, provide the public key to the sender
const publicKey = getPublicKey(privateKey);
// To send messages, create an encoder
const encoder = createEncoder(contentTopic, publicKey);
// For example
waku.lightPush.push(encoder, { payload });
// To receive messages, create a decoder
const decoder = createDecoder(contentTopic, privateKey);
// For example
await waku.store.queryOrderedCallback([decoder], (msg) => {
// ...
});
+import {
createDecoder,
createEncoder,
generatePrivateKey,
getPublicKey,
} from "@waku/message-encryption/ecies";
// Generate a random private key
const privateKey = generatePrivateKey();
// Keep the private key secure, provide the public key to the sender
const publicKey = getPublicKey(privateKey);
// To send messages, create an encoder
const encoder = createEncoder(contentTopic, publicKey);
// For example
waku.lightPush.push(encoder, { payload });
// To receive messages, create a decoder
const decoder = createDecoder(contentTopic, privateKey);
// For example
await waku.store.queryOrderedCallback([decoder], (msg) => {
// ...
});
diff --git a/modules/_waku_peer_exchange.html b/modules/_waku_peer_exchange.html index af20b58a26..0940d290b1 100644 --- a/modules/_waku_peer_exchange.html +++ b/modules/_waku_peer_exchange.html @@ -16,7 +16,7 @@
Pings the given peer in order to obtain the operation latency
-Example