libp2p/routing_record

    Dark Mode
Search:
Group by:
  Source   Edit

Nim-Libp2p Copyright (c) 2021 Status Research & Development GmbH

Licensed under either of

at your option. This file may not be copied, modified, or distributed except according to those terms.

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: [Defect], tags: [RootEffect].}
  Source   Edit
proc decode(T: typedesc[PeerRecord]; buffer: seq[byte]): Result[PeerRecord,
    ProtoError] {....raises: [Defect].}
  Source   Edit
proc encode(record: PeerRecord): seq[byte] {....raises: [Defect], tags: [].}
  Source   Edit
proc init(T: typedesc[PeerRecord]; peerId: PeerId; addresses: seq[MultiAddress];
          seqNo = toUnix(getTime()).uint64): T:type {....raises: [Defect].}
  Source   Edit
proc payloadDomain(T: typedesc[PeerRecord]): string {....raises: [Defect].}
  Source   Edit
proc payloadType(T: typedesc[PeerRecord]): seq[byte] {....raises: [Defect].}
  Source   Edit

Exports

formatItIMPL, hash, init, getField, shortLog, >=, getBytes, shortLog, write, init, public, shortLog, PeerId, ==, toBytes, <=, match, hex, init, write, init, validate, $, init, init, hasPublicKey, match, <, >, len, maxInlineKeyLength, cmp, extractPublicKey, mapAnd, writeLPVarint, MaxMessageSize, DNSANY, hash, append, MaError, IP, IPFS, write, getField, HTTPS, peekArray, MaPatternOp, concat, isEmpty, HTTP, getRepeatedField, getField, ProtoScalar, getProtoHeader, contains, WSS, protocols, &, Unreliable, getLen, UNIX, init, protoName, TranscoderDNS, validate, TranscoderIP6, initVBuffer, mapEq, [], MaPattern, $, MaPatResult, initProtoBuffer, init, ProtoField, peekVarint, TranscoderP2P, protoArgument, getRequiredRepeatedField, $, mapOr, match, writeSeq, write, ProtoResult, WebRTCDirect, DNS6, initVBuffer, WebSockets, UDP, TranscoderIP6Zone, VBuffer, QUIC, toOpenArray, TranscoderOnion, IP4, TranscoderPort, write, isEnough, getRequiredField, getField, shortLog, readSeq, writeArray, write, UTP, shcopy, init, public, MAKind, [], getField, checkFieldNumber, IP6, shortLog, DNSADDR, ProtoFlags, isEmpty, IpTransportProtocol, getRepeatedField, ==, finish, TranscoderUnix, isEmpty, write, writePBVarint, ProtoFieldKind, TCP, MaResult, finish, ProtoError, &=, init, init, init, MultiAddress, initProtoBuffer, MAProtocol, readVarint, getPackedRepeatedField, getProtoHeader, ProtoHeader, init, $, vsizeof, getField, protoAddress, DNS4, readArray, writePacked, getRepeatedField, getPtr, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, isEnough, items, peekSeq, Reliable, hex, ProtoBuffer, matchPartial, DNS, len, WS, high, toString, encode, writeVarint, SupportedWireTypes, verify, Signature, init, SupportedSchemesInt, $, toBytes, DigestSheme, sign, encode, shuffle, decodeExchange, random, Secret, decode, init, init, ==, init, init, getRawBytes, createExchange, $, getField, init, init, SignedPayload, toBytes, write, keyOpenArray, init, ephemeral, decode, write, decodeProposal, init, init, getField, newRng, ==, Envelope, getPublicKey, init, getField, getField, iv, RsaDefaultKeySize, init, random, write, SupportedSchemes, init, random, toBytes, macOpenArray, supported, init, CryptoError, selectBest, toRawBytes, payload, mac, random, CryptoResult, write, EnvelopeError, init, libp2p_pki_schemes, encode, createProposal, write, init, shortLog, getBytes, getBytes, init, PKScheme, ephemeral, PublicKey, key, stretchKeys, ECDHEScheme, init, PrivateKey, getBytes, ivOpenArray, orError, init, goffset, getOrder, KeyPair, init