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, 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, 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, isEnough, 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, verify, Signature, exclIfIt, shortLog, SupportedSchemesInt, $, toBytes, DigestSheme, ephemeral, getField, mac, init, write, ==, write, init, sign, init, encode, shuffle, random, Secret, write, init, init, withValue, safeConvert, supported, withValue, public, init, SignedPayload, toBytes, PrivateKey, keyOpenArray, random, payload, init, getBytes, toOpt, init, ECDHEScheme, newRng, selectBest, Envelope, getPublicKey, init, init, decode, exceptionToAssert, getField, getField, iv, init, CryptoError, ==, init, write, SupportedSchemes, libp2p_pki_schemes, init, random, toBytes, capLen, macOpenArray, init, write, toRawBytes, init, random, CryptoResult, init, write, EnvelopeError, encode, decode, init, ephemeral, shortLog, init, getBytes, init, shortLog, PKScheme, PublicKey, stretchKeys, valueOr, getBytes, getField, ivOpenArray, RsaDefaultKeySize, compilesOr, orError, init, $, goffset, getRawBytes, getOrder, KeyPair, key, init