Outdated Doc libp2p-js peerStore.metadataBook.set

Hi, I was playing with the peerStore API and it seems that the doc is outdated.

According to the documentation the method peerStore.metadataBook.set(peerId, key, value) takes three argument whereas in the current implementation (using "ipfs": "^0.62.1") the method takes two arguments, a peerId and a metadata which is an instance of Map.

The doc could be updated as follows:


Set known metadata of a given peerId .

peerStore.metadataBook.set(peerId, metaData)


Name Type Description
peerId PeerId peerId to set
metaData Map metadata value to store <String, Uint8Array>


Type Description
MetadataBook Returns the Metadata Book component


let metaData = new Map()
metaData.set('location', new TextEncoder().encode('Berlin'))
peerStore.metadataBook.set(peerId, metaData)

Is there a proper place to signal such minor issues?