All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.24.0 - 2022-05-27
waitForRemotePeer
now accepts atimeoutMs
parameter that rejects the promise if it is reached. By default, no timeout is applied.- Experimental support for the Waku Filter protocol (client side) added, currently only works in NodeJS.
waitForRemotePeer
waits for a Relay peer by default instead of Relay and Store.- Breaking: Removed dupe secp256k1 code, removed some unused APIs.
0.23.0 - 2022-05-19
- Some dependencies that were used but not declared (often transient).
- Replaced deprecated
multihashes
withmultiformats
.
- No more
assert
usage.
0.22.0 - 2022-05-10
- Replaced
secp256k1
and henceelliptic
dependencies with@noble/secp256k1
, reducing package size, number of dependency and removing need forcrypto-browserify
polyfill.
0.21.0 - 2022-05-5
- Support of the
waku2
ENR key: When using DNS Discovery, wanted node capabilities (e.g. relay, store) must be passed.
- Prefer the use of
BigInt
over integer literal (n
postfix) to facilitate the use of a polyfill.
- Declare
it-pipe
dependency, import as per[email protected]
convention.
0.20.0 - 2022-03-29
- Examples: Add Relay JavaScript example.
- Breaking: Moved utf-8 conversion functions to
utils
. - Froze
libp2p-gossipsub
to0.13.0
as new patch version bring breaking changes.
- Replace Base 64 buggy conversion functions with
uint8arrays
.
- Breaking: Removed
equalByteArrays
, useuint8arrays/equals
instead. See changes ineth-pm
example. - Breaking: Removed deprecated utils functions.
0.19.2 - 2022-03-21
- Enable usage in NodeJS by fixing
exports
field and usage of thecrypto
module.
0.19.1 - 2022-03-10
- When using
Waku.create
,bootstrap.peers
now accepts an array ofMultiaddr
. - Exports
Protocols
for easy usage withwaitForRemotePeer
.
0.19.0 - 2022-03-09
- New
pubsub_topic
field on thecursor
of Waku Store queries (#585).
- Add
exports
topackage.json
for NodeJS usage (not officially supported but helpful for experiments).
- Handle errors thrown by
bytesToUtf8
. WakuMessage.timestamp
field must use nanoseconds (was using microseconds).
- Removed
ecies-geth
dependency.
0.18.0 - 2022-02-24
- Replaced
rlp
dependency with@ethersproject/rlp
. - Breaking:
staticNoiseKey
changed fromBuffer
toUint8Array
. - Implement Waku Store 2.0.0-beta4. The
WakuMessage.timestamp
field now stores nanoseconds over the wire. - Breaking:
HistoryRPC.createQuery
takesDate
instead ofnumber
forstartTime
andendTime
.
base64url
andbigint-buffer
dependencies.
0.17.0 - 2022-02-16
- Breaking: Upgrade
libp2p
to0.36.2
&libp2p-gossipsub
to0.13.0
. Some APIs are now async. - docs: Various improvements.
- Ran
npm audit fix
. Waku.dial
accepts protocols expected from the peer. Defaults to Waku Relay only.- Deprecated
hexToBuf
&bufToHex
in favour ofhexToBytes
&bytesToHex
to move towards removing thebuffer
polyfill. - Breaking: Replaced
getNodesFromHostedJson
withgetPredefinedBootstrapNodes
. Now, it uses a hardcoded list of nodes.
axios
dependency in favour of fetch.
0.16.0 - 2022-01-31
- Test: Upgrade nim-waku node to v0.7.
- Doc: Renamed "DappConnect" to "Waku Connect".
- Docs: API Docs are now available at https://js-waku.wakuconnect.dev/.
- Breaking: Replace
waitForConnectedPeer
withwaitForRemotePeer
; the new method checks that the peer is ready before resolving the promise.
0.15.0 - 2022-01-17
- Implement DNS Discovery as per EIP-1459,
with ENR records as defined in 31/WAKU2-ENR;
Available by passing
{ bootstrap: { enrUrl: enrtree://... } }
toWaku.create
. - When using
addDecryptionKey
, it is now possible to specify the decryption method and the content topics of the messages to decrypt; this is to reduce the number of decryption attempt done and improve performance.
- Test: Upgrade nim-waku node to v0.6.
- Breaking: Renamed
getBootstrapNodes
togetNodesFromHostedJson
. - Minimum node version changed to 16.
- Breaking: Changed
Waku.create
bootstrap option from{ bootstrap: boolean }
to{ bootstrap: BootstrapOptions }
. Replace{ boostrap: true }
with{ boostrap: { default: true } }
to retain same behaviour. - Breaking:
WakuMessage.decode
andWakuMessage.decodeProto
now accepts method and content topics for the decryption key.WakuMessage.decode(bytes, [key])
becomesWakuMessage.decode(bytes, [{key: key}])
.
- Doc: Some broken links.
0.14.2 - 2021-11-30
- Examples: JS examples uses local ESM folder to replicate behaviour of js-waku publish package.
TypeError
issue related to constructors using js-waku in a JS project (#323).
0.14.1 - 2021-10-22
- Issue when importing the
utils
module.
0.14.0 - 2021-10-13
- If the
callback
function passed toWakuStore.queryHistory
returnstrue
, then no further pages are retrieved from the store. - Use webpack to build UMD bundle of the library, see README for usage.
- Breaking: Renamed
WakuStore.QueryOptions
'sdirection
topageDirection
(and its type) as it only affects the page ordering, not the ordering of messages with the page.
- Docs: Ensure that
WakuStore
'sQueryOptions
documentation is available online.
0.13.1 - 2021-09-21
Error: Bootstrap requires a list of peer addresses
error when usingbootstrap: true
inWaku.create
.
0.13.0 - 2021-09-16
- Upgrade libp2p libraries: @chainsafe/[email protected], [email protected], [email protected].
- Connects to a limited number of bootstrap nodes, defaults to 1.
0.12.2 - 2021-09-21
- hot fix:
Error: Bootstrap requires a list of peer addresses
error when usingbootstrap: true
inWaku.create
.
0.12.1 - 2021-09-16
- hot fix: Connects to a limited number of bootstrap nodes, defaults to 1.
0.12.0 - 2021-09-2
- Examples (eth-pm): Encrypt Public Key Messages using symmetric encryption.
- Guides: Encrypt messages using Waku Message Version 1.
- Allow passing decryption keys in hex string format.
- Allow passing decryption keys to
WakuStore
instance to avoid having to pass them at everyqueryHistory
call. - Allow passing decryption keys to
Waku
instance to avoid having to pass them to bothWakuRelay
andWakuStore
. Waku.waitForConnectedPeer
helper to ensure that we are connected to Waku peers when using the bootstrap option.
- Breaking: Moved
startTime
andendTime
for history queries to atimeFilter
property as both or neither must be passed; passing only one parameter is not supported. - Renamed and promote the usage of
generateSymmetricKey()
to generate random symmetric keys. - Improved errors thrown by
WakuStore.queryHistory
.
- Buffer concat error when using symmetric encryption in the browser.
0.11.0 - 2021-08-20
- Examples: New Ethereum Private Message Using Wallet Encryption Web App
example that demonstrates the usage of
eth_encrypt
API (available on Metamask) and EIP-712 for typed structured data signing. - New
bootstrap
option forWaku.create
to easily connect to Waku nodes upon start up. - Support for
startTime
andendTime
in Store queries to filter by time window as per 21/WAKU2-FTSTORE.
- Renamed
discover.getStatusFleetNodes
todiscovery.getBootstrapNodes
; Changed the API to allow retrieval of bootstrap nodes from other sources. - Examples: Renamed
eth-dm
toeth-pm
; "Direct Message" can lead to confusion with "Direct Connection" that refers to low latency network connections. - Examples (eth-pm): Use sign typed data EIP-712 instead of personal sign.
- Upgraded dependencies to remove warning at installation.
- Breaking: Moved
DefaultPubSubTopic
towaku.ts
and fixed the casing. - Breaking: Rename all
pubsubTopic
occurrences topubSubTopic
, across all interfaces.
- Examples (cli-chat): The focus of this library is Web environment; Several examples now cover usage of Waku Relay and Waku Store making cli-chat example obsolete; web-chat POC should be preferred to use the TOY-CHAT protocol.
ChatMessage
has been moved from js-waku to web-chat example; it is a type used for the TOY-CHAT protocol; js-waku users should not build on top if this toy protocol and instead design message data structures appropriate to their use case.- Unused dependencies & scripts.
0.10.0 - 2021-08-06
- Relay and ReactJS guides and examples (#56).
- Breaking: The
WakuMessage
APIs have been changed to movecontentTopic
out of the optional parameters. - Breaking: Move
contentTopics
out theWakuStore.queryHistory
's optional parameters. - Breaking:
WakuStore.queryHistory
throws when encountering an error instead of returning anull
value.
- Examples (web-chat): Remove broken
/fleet
command. - Breaking: Removed
DefaultContentTopic
as developers must choose a content topic for their app; recommendations for content topic can be found at https://rfc.vac.dev/spec/23/.
WakuMessage.payloadAsUtf8
returning garbage on utf-8 non-ascii characters.ChatMessage.payloadAsUtf8
returning garbage on utf-8 non-ascii characters.
0.9.0 - 2021-07-26
- Breaking: Store Response Protobuf changed to align with nim-waku v0.5 (nim-waku#676).
0.8.1 - 2021-07-16
- Examples (web-chat): New
/fleet
command to switch connection between Status prod and test fleets. - Export
generatePrivateKey
andgetPublicKey
directly from the root. - Usage of the encryption and signature APIs to the readme.
- Support multiple protocol ids for Waku Relay, allowing interoperability with nim-waku v0.4 and latest master (#238).
- Breaking: Renamed
WakuRelay.(add|delete)PrivateDecryptionKey
toWakuRelay.(add|delete)DecryptionKey
to make it clearer that it accepts both symmetric keys and asymmetric private keys. - Upgrade libp2p to 0.32.0.
- Breaking: Rename
keepAlive
option topingKeepAlive
. - Introduced new
relayKeepAlive
option onWaku
with a default to 59s to send ping messages over relay to ensure the relay stream stays open. This is a workaround until js-libp2p#744 is done as there are issues when TCP(?) timeouts and the stream gets closed (#185, js-libp2p#939)
- Align
WakuMessage
readme example with actual code behaviour. - Remove infinite loop when an error with Waku Store is encountered.
0.8.0 - 2021-07-15
WakuRelay.deleteObserver
to allow removal of observers, useful when a React component add observers when mounting and needs to delete it when unmounting.- Keep alive feature that pings host regularly, reducing the chance of connections being dropped due to idle.
Can be disabled or default frequency (10s) can be changed when calling
Waku.create
. - New
lib/utils
module for easy, dependency-less hex/bytes conversions. - New
peers
andrandomPeer
methods onWakuStore
andWakuLightPush
to have a better idea of available peers; Note that it does not check whether Waku node is currently connected to said peers. - Enable passing decryption private keys to
WakuStore.queryHistory
. - Test: Introduce testing in browser environment (Chrome) using Karma.
- Add support for Waku Message version 1: Asymmetric encryption, symmetric encryption, and signature of the data.
- Breaking: Auto select peer if none provided for store and light push protocols.
- Upgrade to
[email protected]
and[email protected]
to avoidTextEncoder
errors in ReactJS tests. - Disable keep alive by default as latest nim-waku release does not support ping protocol.
- Breaking: Optional parameters for
WakuMessage.fromBytes
andWakuMessage.fromUtf8String
are now passed in a singleOptions
object. - Breaking:
WakuMessage
static functions are now async to allow for encryption and decryption. - Breaking:
WakuMessage
constructor is now private,from*
anddecode*
function should be used. WakuMessage
version 1 is partially supported, enabling asymmetrical encryption and signature of messages; this can be done by passing keys toWakuMessage.from*
andWakuMessage.decode*
methods.- Examples (eth-dm): Use Waku Message version 1 encryption scheme instead of
eth-crypto
. - Examples (eth-dm): Use Protobuf for direct messages instead of JSON (#214).
- Disable
keepAlive
if set to0
.
0.7.0 - 2021-06-15
- Test: Upgrade nim-waku node to v0.4.
- Waku Light Push upgraded to
2.0.0-beta1
. - Examples (web chat): Catch error if chat message decoding fails.
- Examples (web chat): Do not send message if shift/alt/ctrl is pressed, enabling multiline messages.
0.6.0 - 2021-06-09
- Breaking: Websocket protocol is not automatically added anymore if the user specifies a protocol in
libp2p.modules
when usingWaku.create
. - Breaking: Options passed to
Waku.create
used to be passed toLibp2p.create
; Now, only thelibp2p
property is passed toLibp2p.create
, allowing for a cleaner interface. - Examples (cli chat): Use tcp protocol instead of websocket.
- Enable access to
WakuMessage.timestamp
. - Examples (web chat): Use
WakuMessage.timestamp
as unique key for list items. - Doc: Link to new topic guidelines in README.
- Doc: Link to Waku v2 Toy Chat specs in README.
- Examples (web chat): Persist nick.
- Support for custom PubSub Topics to
Waku
,WakuRelay
,WakuStore
andWakuLightPush
; Passing a PubSub Topic is optional and still defaults to/waku/2/default-waku/proto
; JS-Waku currently supports one, and only, PubSub topic per instance.
0.5.0 - 2021-05-21
- Implement Waku v2 Light Push protocol.
- Expose
Direction
enum from js-waku root (it was only accessible via the proto module). - Examples (cli chat): Use light push to send messages if
--lightPush
is passed. - Examples (cli chat): Print usage if
--help
is passed.
0.4.0 - 2021-05-18
callback
argument toWakuStore.queryHistory()
, called as messages are retrieved ; Messages are retrieved using pagination, and it may take some time to retrieve all messages, with thecallback
function, messages are processed as soon as they are received.
- Testing: Upgrade nim-waku node to v0.3.
- Breaking: Modify
WakuStore.queryHistory()
to accept oneObject
instead of multiple individual arguments. getStatusFleetNodes
return prod nodes by default, instead of test nodes.- Examples (web chat): Connect to prod fleet by default, test fleet for local development.
- Examples (cli chat): Connect to test fleet by default, use
--prod
to connect to prod fleet.
- Expose
Enviroment
andProtocol
enums to pass togetStatusFleetNodes
.
0.3.0 - 2021-05-15
getStatusFleetNodes
to connect to Status' nim-waku nodes.
- Clarify content topic format in README.md.
- Unused dependencies.
0.2.0 - 2021-05-14
WakuRelay.getPeers
method.- Use
WakuRelay.getPeers
in web chat app example to disable send button.
- Enable passing
string
s toaddPeerToAddressBook
. - Use
addPeerToAddressBook
in examples and usage doc. - Settle on
js-waku
name across the board. - Breaking:
RelayDefaultTopic
renamed toDefaultPubsubTopic
.
0.1.0 - 2021-05-12
- Add usage section to the README.
- Support of Waku v2 Relay.
- Support of Waku v2 Store.
- Node Chat App example.
- ReactJS Chat App example.
- Typedoc Documentation.