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