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