libp2p/peerinfo

    Dark Mode
Search:
Group by:
  Source   Edit

Our local peer info

Types

AddressMapper = proc (listenAddrs: seq[MultiAddress]): Future[seq[MultiAddress]] {.
    ...gcsafe, raises: [].}
A proc that expected to resolve the listen addresses into dialable addresses   Source   Edit
PeerInfo {.public.} = ref object
  peerId*: PeerId
  listenAddrs*: seq[MultiAddress] ## contains addresses the node listens on, which may include wildcard and private addresses (not directly reachable).
  addrs: seq[MultiAddress]   ## contains resolved addresses that other peers can use to connect, including public-facing NAT and port-forwarded addresses.
  addressMappers*: seq[AddressMapper] ## contains a list of procs that can be used to resolve the listen addresses into dialable addresses.
  protocols*: seq[string]
  protoVersion*: string
  agentVersion*: string
  privateKey*: PrivateKey
  publicKey*: PublicKey
  signedPeerRecord*: SignedPeerRecord
  Source   Edit
PeerInfoError = object of LPError
  Source   Edit

Procs

proc addrs(p: PeerInfo): seq[MultiAddress] {....raises: [], public, ...tags: [].}
  Source   Edit
proc fullAddrs(p: PeerInfo): MaResult[seq[MultiAddress]] {....raises: [], public,
    ...tags: [RootEffect].}
  Source   Edit
proc new(p: typedesc[PeerInfo]; key: PrivateKey;
         listenAddrs: openArray[MultiAddress] = [];
         protocols: openArray[string] = []; protoVersion: string = "";
         agentVersion: string = ""; addressMappers = newSeq[AddressMapper]()): PeerInfo {.
    ...raises: [LPError], raises: [], public.}
  Source   Edit
proc parseFullAddress(ma: MultiAddress): MaResult[(PeerId, MultiAddress)] {.
    ...raises: [], public, ...tags: [RootEffect].}
  Source   Edit
proc parseFullAddress(ma: string | seq[byte]): MaResult[(PeerId, MultiAddress)] {.
    ...raises: [], public.}
  Source   Edit
func shortLog(p: PeerInfo): auto {....raises: [], public, ...tags: [RootEffect].}
  Source   Edit
proc update(p: PeerInfo): Future[void] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], public, ...raises: [], public, ...tags: [RootEffect].}
  Source   Edit

Templates

template formatItIMPL(it: PeerInfo): auto
  Source   Edit

Exports

formatItIMPL, hash, shortLog, random, $, write, PeerId, ==, getField, <=, capLen, init, validate, init, match, <, getBytes, maxInlineKeyLength, write, withValue, safeConvert, shortLog, >=, withValue, public, shortLog, compilesOr, toBytes, match, valueOr, init, init, init, toOpt, init, withValue, hasPublicKey, >, hex, len, exceptionToAssert, cmp, extractPublicKey, DNS_OR_IP, hash, UDP_DNS, MaError, IPFS, MaPatternOp, isEmpty, WS_DNS, initVBuffer, ProtoScalar, getProtoHeader, hex, protocols, bytes, ==, getLen, HTTPS, UNIX, hash, isEnough, TranscoderIP6, multiCodec, [], MaResult, init, ProtoField, peekVarint, getRequiredRepeatedField, $, mapOr, writeSeq, WebSockets_IP, &, DNS6, TLS_WS, [], IpTransportProtocol, QUIC, toOpenArray, IP4, TranscoderPort, withValue, safeConvert, getRequiredField, $, WS_IP, withValue, public, MAKind, write, getField, checkFieldNumber, TranscoderOnion3, codec, getRepeatedField, matchPartial, protoArgument, match, WebSockets, $, isEmpty, HTTP, initVBuffer, finish, VBuffer, init, TcpOnion3, initProtoBuffer, MAProtocol, peekSeq, getPackedRepeatedField, toOpt, getProtoHeader, ProtoHeader, IP, getField, protoAddress, DNS4, readArray, getPtr, withValue, multiCodec, P2PPattern, CircuitRelay, contains, isEnough, Reliable, ProtoBuffer, write, len, WS, exceptionToAssert, mapAnd, UDP_IP, DNSANY, ==, DNSADDR, append, write, WSS_IP, peekArray, WSS, codec, readSeq, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, TCP_DNS, encode, capLen, init, protoName, protoArgument, validate, ==, mapEq, Onion3, MaPattern, TranscoderIP6Zone, initProtoBuffer, concat, TranscoderP2P, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, MultiCodec, len, $, UDP, MaPatResult, TranscoderOnion, write, init, shortLog, items, isEmpty, writeArray, data, write, init, UTP, [], IP6, shortLog, MultiCodecError, ProtoFlags, ==, toString, finish, WebSockets_DNS, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, DNS, InvalidMultiCodec, TranscoderUnix, high, !=, writeVarint, SupportedWireTypes, Signature, shortLog, toBytes, DigestSheme, ephemeral, init, toRawBytes, sign, SupportedSchemesInt, ECDHEScheme, macOpenArray, Secret, $, write, init, selectBest, init, ephemeral, withValue, safeConvert, init, init, withValue, public, init, getField, valueOr, init, toBytes, random, init, getBytes, getBytes, toOpt, init, newRng, withValue, getPublicKey, init, random, init, exceptionToAssert, init, init, init, getField, iv, CryptoError, ==, verify, init, key, SupportedSchemes, RsaDefaultKeySize, toBytes, capLen, shuffle, supported, write, ==, libp2p_pki_schemes, random, getRawBytes, random, keyOpenArray, CryptoResult, stretchKeys, init, write, init, shortLog, init, PublicKey, mac, shortLog, PKScheme, init, PrivateKey, getBytes, ivOpenArray, write, compilesOr, orError, $, write, goffset, getOrder, KeyPair, DNS_OR_IP, shortLog, init, random, UDP_DNS, <=, MaError, ephemeral, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, ==, ==, ==, getLen, ECDHEScheme, shortLog, init, init, finish, [], macOpenArray, random, Secret, peekVarint, random, $, validate, mapOr, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, init, withValue, getRequiredField, mac, stretchKeys, WS_IP, write, public, MAKind, toRawBytes, write, getField, checkFieldNumber, key, codec, getRepeatedField, matchPartial, init, InvalidMultiCodec, HTTP, initVBuffer, VBuffer, getBytes, finish, peekSeq, toOpt, payloadType, getProtoHeader, ProtoHeader, IP, protoAddress, newRng, ==, withValue, checkValid, getPublicKey, CircuitRelay, WebSockets, exceptionToAssert, extractPublicKey, mapAnd, UDP_IP, init, ==, DNSADDR, write, WSS, TCP_IP, writePacked, toBytes, TCP_DNS, multiCodec, len, capLen, supported, init, protoName, write, TranscoderIP6Zone, $, initProtoBuffer, multiCodec, init, ProtoBuffer, WSS_DNS, match, writeLPVarint, CryptoResult, ProtoResult, WebRTCDirect, init, $, UDP, TranscoderOnion, write, init, readVarint, isEmpty, writeArray, PeerId, [], IP6, shortLog, initVBuffer, decode, ProtoFlags, PKScheme, init, payload, init, init, write, init, valueOr, TCP, PrivateKey, write, &=, random, compilesOr, TranscoderIP4, init, $, initProtoBuffer, DNS, init, init, goffset, getRawBytes, >, KeyPair, DNSANY, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, Signature, contains, verify, toBytes, DigestSheme, IPFS, getField, init, libp2p_pki_schemes, isEmpty, ProtoScalar, hex, protocols, init, hash, HTTPS, UNIX, encode, hash, len, getPtr, TLS_WS, TranscoderIP6, readSeq, encode, data, MaResult, init, ProtoField, toBytes, writeSeq, &, DNS6, [], IpTransportProtocol, toOpenArray, IP4, TranscoderPort, isEnough, safeConvert, getField, init, >=, init, payloadDomain, $, MaPattern, withValue, init, TranscoderOnion3, SignedPayload, toBytes, protoArgument, write, keyOpenArray, match, WebSockets_DNS, $, isEmpty, getRequiredRepeatedField, init, initProtoBuffer, MAProtocol, decode, getPackedRepeatedField, getField, DNS4, readArray, selectBest, getBytes, MultiCodec, P2PPattern, Envelope, hasPublicKey, init, isEnough, init, Reliable, hex, write, WS, init, init, init, getField, match, getField, <, iv, CryptoError, append, init, decode, WSS_IP, peekArray, PeerRecord, init, codec, getRepeatedField, getField, encode, RsaDefaultKeySize, Unreliable, SupportedSchemesInt, random, init, shuffle, validate, $, mapEq, getField, Onion3, getBytes, TcpOnion3, concat, TranscoderP2P, AddressInfo, sign, write, EnvelopeError, encode, len, MaPatResult, shortLog, ==, write, getBytes, write, init, UTP, MultiCodecError, PublicKey, WebSockets_IP, SupportedSchemes, writePBVarint, ProtoFieldKind, protoArgument, getRepeatedField, ProtoError, init, write, getField, MultiAddress, ephemeral, ivOpenArray, orError, vsizeof, getField, protoCode, MaInvalidAddress, writeVarint, items, write, getOrder, hash, TranscoderUnix, SignedPeerRecord, !=, toException, toException, checkFutures, LPError