Documentation ¶
Overview ¶
Package address defines the Address API. All chains must implement this API, so that addresses can be encoded/decoded.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
An Address is a human-readable representation of a public identity. It can be the address of an external account, contract, or script.
func (Address) Marshal ¶
Marshal the address to binary. You should not call this function directly, unless you are implementing marshalling for a container type.
type Decoder ¶
type Decoder interface {
DecodeAddress(Address) (RawAddress, error)
}
The Decoder interfaces is used to convert human-readable addresses into raw addresses.
type EncodeDecoder ¶
The EncodeDecoder interfaces combines encoding and decoding functionality into one interface.
type Encoder ¶
type Encoder interface {
EncodeAddress(RawAddress) (Address, error)
}
The Encoder interface is used to convert raw addresses into human-readable addresses.
type RawAddress ¶
RawAddress is an address that has been decoded into its binary form.
func (RawAddress) Marshal ¶
Marshal the address to binary. You should not call this function directly, unless you are implementing marshalling for a container type.
func (RawAddress) SizeHint ¶
func (addr RawAddress) SizeHint() int
SizeHint returns the number of bytes required to represent the address in binary.