Versions in this module Expand all Collapse all v0 v0.0.3 Feb 27, 2024 v0.0.3-replace Feb 27, 2024 v0.0.2 Feb 27, 2024 v0.0.2-replace Feb 27, 2024 v0.0.1 Feb 27, 2024 Changes in this version + const PeerRecordEnvelopeDomain + var AdvancedEnableInlining = true + var ErrEmptyPeerID = errors.New("empty peer ID") + var ErrInvalidAddr = fmt.Errorf("invalid p2p multiaddr") + var ErrNoPublicKey = errors.New("public key is not embedded in peer ID") + var PeerRecordEnvelopePayloadType = []byte + func AddrInfoToP2pAddrs(pi *AddrInfo) ([]ma.Multiaddr, error) + func TimestampSeq() uint64 + func ToCid(id ID) cid.Cid + type AddrInfo struct + Addrs []ma.Multiaddr + ID ID + func AddrInfoFromP2pAddr(m ma.Multiaddr) (*AddrInfo, error) + func AddrInfoFromString(s string) (*AddrInfo, error) + func AddrInfosFromP2pAddrs(maddrs ...ma.Multiaddr) ([]AddrInfo, error) + func (pi *AddrInfo) Loggable() map[string]interface{} + func (pi *AddrInfo) UnmarshalJSON(b []byte) (err error) + func (pi AddrInfo) MarshalJSON() (res []byte, err error) + func (pi AddrInfo) String() string + type ID string + func AddrInfosToIDs(pis []AddrInfo) []ID + func Decode(s string) (ID, error) + func FromCid(c cid.Cid) (ID, error) + func IDFromBytes(b []byte) (ID, error) + func IDFromPrivateKey(sk ic.PrivKey) (ID, error) + func IDFromPublicKey(pk ic.PubKey) (ID, error) + func SplitAddr(m ma.Multiaddr) (transport ma.Multiaddr, id ID) + func (id *ID) Unmarshal(data []byte) (err error) + func (id *ID) UnmarshalBinary(data []byte) error + func (id *ID) UnmarshalJSON(data []byte) (err error) + func (id *ID) UnmarshalText(data []byte) error + func (id ID) ExtractPublicKey() (ic.PubKey, error) + func (id ID) Loggable() map[string]interface{} + func (id ID) Marshal() ([]byte, error) + func (id ID) MarshalBinary() ([]byte, error) + func (id ID) MarshalJSON() ([]byte, error) + func (id ID) MarshalText() ([]byte, error) + func (id ID) MarshalTo(data []byte) (n int, err error) + func (id ID) MatchesPrivateKey(sk ic.PrivKey) bool + func (id ID) MatchesPublicKey(pk ic.PubKey) bool + func (id ID) ShortString() string + func (id ID) Size() int + func (id ID) String() string + func (id ID) Validate() error + type IDSlice []ID + func (es IDSlice) Len() int + func (es IDSlice) Less(i, j int) bool + func (es IDSlice) String() string + func (es IDSlice) Swap(i, j int) + type PeerRecord struct + Addrs []ma.Multiaddr + PeerID ID + Seq uint64 + func NewPeerRecord() *PeerRecord + func PeerRecordFromAddrInfo(info AddrInfo) *PeerRecord + func PeerRecordFromProtobuf(msg *pb.PeerRecord) (*PeerRecord, error) + func (r *PeerRecord) Codec() []byte + func (r *PeerRecord) Domain() string + func (r *PeerRecord) Equal(other *PeerRecord) bool + func (r *PeerRecord) MarshalRecord() (res []byte, err error) + func (r *PeerRecord) ToProtobuf() (*pb.PeerRecord, error) + func (r *PeerRecord) UnmarshalRecord(bytes []byte) (err error)