Documentation ¶
Overview ¶
Package addresses defines the message format that provides the network multi-address of a peer with a given public identity key.
Index ¶
- Constants
- func Gen() codec.Codec
- func Splice(s *splice.Splice, id nonce.ID, key *crypto.Pub, addrs []*netip.AddrPort, ...)
- type Ad
- func (x *Ad) Decode(s *splice.Splice) (e error)
- func (x *Ad) Encode(s *splice.Splice) (e error)
- func (x *Ad) Len() int
- func (x *Ad) Magic() string
- func (x *Ad) Sign(prv *crypto.Prv) (e error)
- func (x *Ad) Splice(s *splice.Splice)
- func (x *Ad) SpliceNoSig(s *splice.Splice)
- func (x *Ad) Unwrap() interface{}
- func (x *Ad) Validate() (valid bool)
Constants ¶
View Source
const ( Magic = "adad" Len = ad.Len + splice.AddrLen )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ad ¶
type Ad struct { // Embed ad.Ad for the common fields ad.Ad // Addresses that the peer can be reached on. Addresses []*netip.AddrPort }
Ad stores a specification for the fee rate and the service ports of a set of services being offered at a relay
These must be a well known port to match with a type of service, eg 80 for web, 53 for DNS, 8333 for bitcoin p2p, 8334 for bitcoin JSONRPC... For simplicity.
func (*Ad) Len ¶
Len returns the length of bytes required to encode the Ad, based on the number of Addresses inside it.
func (*Ad) SpliceNoSig ¶
SpliceNoSig splices until the signature.
Click to show internal directories.
Click to hide internal directories.