libp2p/routing_record

    Dark Mode
Search:
Group by:
  Source   Edit

This module implements Routing Records.Functions related to signed peer records

Types

AddressInfo = object
  address*: MultiAddress
  Source   Edit
PeerRecord = object
  peerId*: PeerId
  seqNo*: uint64
  addresses*: seq[AddressInfo]
  Source   Edit

Procs

proc checkValid(spr: SignedPeerRecord): Result[void, EnvelopeError] {.
    ...raises: [], tags: [RootEffect].}
  Source   Edit
proc decode(T: typedesc[PeerRecord]; buffer: seq[byte]): Result[PeerRecord,
    ProtoError] {....raises: [].}
  Source   Edit
proc encode(record: PeerRecord): seq[byte] {....raises: [], tags: [].}
  Source   Edit
proc init(T: typedesc[PeerRecord]; peerId: PeerId; addresses: seq[MultiAddress];
          seqNo = toUnix(getTime()).uint64): T:type {....raises: [].}
  Source   Edit
proc payloadDomain(T: typedesc[PeerRecord]): string {....raises: [].}
  Source   Edit
proc payloadType(T: typedesc[PeerRecord]): seq[byte] {....raises: [].}
  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, $, toBytes, DigestSheme, ephemeral, getField, init, random, ECDHEScheme, selectBest, filterIt, decode, init, sign, encode, shuffle, supported, init, Secret, init, ephemeral, withValue, safeConvert, init, withValue, public, getBytes, getBytes, valueOr, key, SignedPayload, mac, toBytes, libp2p_pki_schemes, payload, decode, init, toOpt, init, newRng, withValue, Envelope, getPublicKey, init, init, write, init, getField, getField, getField, iv, CryptoError, ==, keyOpenArray, init, write, SupportedSchemes, SupportedSchemesInt, random, toBytes, capLen, macOpenArray, init, ==, toRawBytes, write, init, random, CryptoResult, write, EnvelopeError, encode, init, init, init, shortLog, getBytes, write, init, verify, shortLog, PKScheme, PublicKey, random, stretchKeys, init, PrivateKey, init, write, ivOpenArray, RsaDefaultKeySize, compilesOr, orError, init, $, goffset, getRawBytes, getOrder, KeyPair, init