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, CircuitRelay, concat, isEmpty, HTTP, getRepeatedField, getField, ProtoScalar, getProtoHeader, contains, WSS, protocols, &, Unreliable, getLen, UNIX, init, protoName, TranscoderDNS, validate, TranscoderIP6, initVBuffer, protoCode, 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, P2PPattern, MaInvalidAddress, initProtoBuffer, isEnough, items, peekSeq, Reliable, hex, ProtoBuffer, matchPartial, DNS, len, WS, high, toString, encode, writeVarint, SupportedWireTypes, verify, mac, Signature, shortLog, ECDHEScheme, $, toBytes, DigestSheme, ephemeral, getField, init, sign, encode, shuffle, random, supported, init, Secret, decode, selectBest, key, createExchange, $, public, write, init, init, init, SignedPayload, toBytes, keyOpenArray, random, getBytes, init, decode, decodeProposal, init, newRng, Envelope, getPublicKey, init, init, init, getField, getField, iv, init, ==, libp2p_pki_schemes, write, init, SupportedSchemes, RsaDefaultKeySize, SupportedSchemesInt, random, toBytes, macOpenArray, init, CryptoError, ==, toRawBytes, payload, write, CryptoResult, write, EnvelopeError, init, encode, init, createProposal, init, shortLog, getRawBytes, getBytes, shortLog, PKScheme, ephemeral, PublicKey, stretchKeys, write, PrivateKey, getBytes, init, getField, ivOpenArray, random, orError, decodeExchange, init, goffset, getOrder, KeyPair, init, init