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, 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, hash, UDP_DNS, MaError, IPFS, MaPatternOp, isEmpty, WS_DNS, initVBuffer, ProtoScalar, getProtoHeader, hex, protocols, bytes, ==, getLen, HTTPS, UNIX, hash, isEnough, TranscoderIP6, multiCodec, [], 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, write, getField, checkFieldNumber, TranscoderOnion3, codec, getRepeatedField, matchPartial, protoArgument, match, WebSockets, $, isEmpty, HTTP, initVBuffer, finish, VBuffer, init, TcpOnion3, initProtoBuffer, MAProtocol, peekSeq, getPackedRepeatedField, toOpt, getProtoHeader, ProtoHeader, IP, getField, protoAddress, DNS4, readArray, getPtr, withValue, multiCodec, P2PPattern, CircuitRelay, contains, isEnough, Reliable, ProtoBuffer, write, len, WS, exceptionToAssert, mapAnd, UDP_IP, DNSANY, ==, DNSADDR, append, write, WSS_IP, peekArray, WSS, codec, readSeq, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, TCP_DNS, encode, capLen, init, protoName, protoArgument, validate, ==, mapEq, Onion3, MaPattern, TranscoderIP6Zone, initProtoBuffer, concat, TranscoderP2P, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, MultiCodec, len, $, UDP, MaPatResult, TranscoderOnion, write, init, shortLog, items, isEmpty, writeArray, data, write, init, UTP, [], IP6, shortLog, MultiCodecError, ProtoFlags, ==, toString, finish, WebSockets_DNS, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, DNS, InvalidMultiCodec, TranscoderUnix, high, !=, writeVarint, SupportedWireTypes, verify, Signature, shortLog, init, SupportedSchemesInt, $, toBytes, DigestSheme, ephemeral, getField, mac, init, decode, ==, write, sign, init, encode, shuffle, random, init, Secret, write, init, init, ephemeral, withValue, safeConvert, init, supported, withValue, public, key, init, init, SignedPayload, toBytes, PrivateKey, ECDHEScheme, keyOpenArray, payload, withValue, toOpt, newRng, selectBest, Envelope, getPublicKey, init, random, write, exceptionToAssert, init, getField, getField, iv, init, CryptoError, ==, write, SupportedSchemes, libp2p_pki_schemes, init, toBytes, random, capLen, macOpenArray, init, toRawBytes, 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