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, 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, QUIC_DNS, LPError, 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, QUIC_V1_IP, readArray, getPtr, withValue, P2PPattern, CircuitRelay, contains, isEnough, Reliable, len, WS, exceptionToAssert, mapAnd, maErr, UDP_IP, DNSANY, DNSADDR, append, write, WSS_IP, peekArray, WSS, readSeq, QUIC_V1, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, checkFutures, TCP_DNS, capLen, init, protoName, protoArgument, validate, mapEq, Onion3, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, concat, TranscoderP2P, toException, ProtoBuffer, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, len, UDP, MaPatResult, TranscoderOnion, QUIC_V1_DNS, write, init, shortLog, items, isEmpty, writeArray, write, WebSockets_DNS, init, UTP, [], IP6, shortLog, ProtoFlags, QUIC_IP, finish, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, toException, DNS, write, TranscoderUnix, high, toString, writeVarint, SupportedWireTypes, verify, Signature, exclIfIt, shortLog, init, $, toBytes, DigestSheme, ephemeral, getField, mac, init, decode, ==, sign, init, encode, shuffle, random, init, Secret, write, init, init, ephemeral, withValue, safeConvert, init, supported, withValue, public, key, init, init, SignedPayload, toBytes, PrivateKey, keyOpenArray, random, payload, toOpt, newRng, selectBest, write, Envelope, getPublicKey, init, ECDHEScheme, write, exceptionToAssert, init, getField, getField, iv, init, CryptoError, ==, write, SupportedSchemes, libp2p_pki_schemes, init, SupportedSchemesInt, random, toBytes, capLen, macOpenArray, init, toRawBytes, withValue, init, random, CryptoResult, init, write, EnvelopeError, encode, shortLog, init, getBytes, init, decode, shortLog, PKScheme, PublicKey, stretchKeys, valueOr, getBytes, init, getField, ivOpenArray, RsaDefaultKeySize, getBytes, compilesOr, orError, init, $, write, goffset, getRawBytes, getOrder, KeyPair, init