Peer data used to update the peer store

interface PeerData {
    addresses?: Address[];
    metadata?: Map<string, undefined | Uint8Array> | Record<string, undefined | Uint8Array>;
    multiaddrs?: Multiaddr[];
    peerRecordEnvelope?: Uint8Array;
    protocols?: string[];
    publicKey?: PublicKey;
    tags?: Map<string, undefined | TagOptions> | Record<string, undefined | TagOptions>;
}

Properties

addresses?: Address[]

Peer's addresses containing its multiaddrs and metadata - multiaddrs passed here can be treated as certified if the isCertifed value is set to true.

If both addresses and multiaddrs are specified they will be merged together with entries in addresses taking precedence.

metadata?: Map<string, undefined | Uint8Array> | Record<string, undefined | Uint8Array>

Peer's metadata map. When merging pass undefined as values to remove metadata.

multiaddrs?: Multiaddr[]

Peer's multiaddrs - any multiaddrs passed here will be treated as uncertified.

If both addresses and multiaddrs are specified they will be merged together with entries in addresses taking precedence.

peerRecordEnvelope?: Uint8Array

The last peer record envelope received

protocols?: string[]

Peer's supported protocols

publicKey?: PublicKey

If this Peer has an RSA key, it's public key can be set with this property.

The byte array should be the protobuf encoded form of the public key.

tags?: Map<string, undefined | TagOptions> | Record<string, undefined | TagOptions>

Peer tags. When merging pass undefined as values to remove tags.