Unmarshal and verify a signed peer record, extract the multiaddrs and overwrite the stored addresses for the peer.
Optionally pass an expected PeerId to verify that the peer record was signed by that peer.
Optional
options: ConsumePeerRecordOptionsOptional
expectedPeer: PeerIdOptional
options: AbortOptionsDelete all data stored for the passed peer
Optional
options: AbortOptionsLoop over every peer - the looping is async because we read from a datastore but the peer operation is sync, this is to prevent long-lived peer operations causing deadlocks over the datastore which can happen if they try to access the peer store during the loop
Returns all data stored for the passed PeerId
Optional
options: AbortOptionsReturns a PeerInfo object for the passed peer id. This is similar to get
except the returned value contains fewer fields and is often used to
exchange peer information with other systems.
The returned object can be passed to JSON.stringify
without any
additional processing.
Optional
options: AbortOptionsReturns true if the passed PeerId is in the peer store
Optional
options: AbortOptionsAdds a peer to the peer store, deeply merging any existing data.
Optional
options: AbortOptionsAdds a peer to the peer store, overwriting only the passed fields
Optional
options: AbortOptionsAdds a peer to the peer store, overwriting any existing data
Optional
options: AbortOptions
Returns all peers in the peer store.