Documentation ¶
Index ¶
Constants ¶
View Source
const ( BucketSize = 20 AddrTimeout = 24 * time.Hour )
View Source
const (
VersionSeparator = '.'
)
Variables ¶
View Source
var (
ErrNoSeparator = errors.New("no separator")
)
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
func NewAddressV1 ¶
NewAddressV1 creates a new version 1 address from the ecdh.PublicKey.
func ParseAddress ¶
ParseAddress parses a string representation of an address into an address.
func (Address) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler.
func (Address) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Address) String ¶
String returns the string representation of the address in the following format:
wn<version>.<encoded bytes>
For example:
wn1.ybndrfg8ejkmcpqxot1uwisza345h769
func (*Address) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (*Address) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Distance ¶
type Distance struct {
// contains filtered or unexported fields
}
Distance represents a distance between two addresses.
Click to show internal directories.
Click to hide internal directories.