diff --git a/CHANGELOG.md b/CHANGELOG.md index 775f2af9a4..ba9725419e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Enable passing `string`s to `addPeerToAddressBook`. -- Use `addPeerToAddressBook` in examples. +- Use `addPeerToAddressBook` in examples and usage doc. ## [0.1.0] - 2021-05-12 diff --git a/README.md b/README.md index d0717d2383..347e969458 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ Connect to a new peer: import { multiaddr } from 'multiaddr'; import PeerId from 'peer-id'; +// Directly dial a new peer +await waku.dial('/dns4/node-01.do-ams3.jdev.misc.statusim.net/tcp/7010/wss/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ'); + +// Or, add peer to address book so it auto dials in the background waku.addPeerToAddressBook( '16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ', ['/dns4/node-01.do-ams3.jdev.misc.statusim.net/tcp/7010/wss']