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