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