core/certified_addr_book library
CertifiedAddrBook manages signed peer records and "self-certified" addresses
contained within them.
Use this interface with an AddrBook
.
To test whether a given AddrBook / Peerstore implementation supports certified addresses, callers should use the GetCertifiedAddrBook helper or type-assert on the CertifiedAddrBook interface:
if (addrBook is CertifiedAddrBook) { (addrBook as CertifiedAddrBook).consumePeerRecord(signedPeerRecord, ttl); }
Classes
- CertifiedAddrBook
- CertifiedAddrBook manages signed peer records and "self-certified" addresses contained within them.
Functions
-
getCertifiedAddrBook(
dynamic ab) → (bool, CertifiedAddrBook?) - GetCertifiedAddrBook is a helper to "upcast" an AddrBook to a CertifiedAddrBook by using type assertion. If the given AddrBook is also a CertifiedAddrBook, it will be returned, and the ok return value will be true. Returns (null, false) if the AddrBook is not a CertifiedAddrBook.