Constructors
constructor
- new PeerManager<T>(storage, key): PeerManager<T>
-
Properties
Private
Readonly
storageManager
storageManager: any
Methods
addPeer
- addPeer(peerInfo): Promise<void>
-
Returns Promise<void>
getPeer
- getPeer(publicKey): Promise<undefined | ArrayElem<StorageKeyReturnType[T]>>
-
Returns Promise<undefined | ArrayElem<StorageKeyReturnType[T]>>
getPeers
- getPeers(): Promise<StorageKeyReturnType[T]>
-
hasPeer
- hasPeer(publicKey): Promise<boolean>
-
Returns Promise<boolean>
removeAllPeers
- removeAllPeers(): Promise<void>
-
Returns Promise<void>
removePeer
- removePeer(publicKey): Promise<void>
-
Returns Promise<void>
removePeers
- removePeers(publicKeys): Promise<void>
-
Returns Promise<void>
Internalapi
The PeerManager provides CRUD functionality for peer entities and persists them to the provided storage.