Documentation ¶
Index ¶
Constants ¶
View Source
const ( AccountTypeCommon uint32 = iota AccountTypeChain AccountTypeHot AccountTypeIssue )
account type
View Source
const AccountVariety = 3
AccountVariety max index of account type
View Source
const (
AddressLength = 20
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { URL URL `json:"url"` AccountType uint32 //AhainCoords []uint32 PublicKey *crypto.PublicKey Address Address }
Account the definition of common account struct
func (*Account) Deserialize ¶
Deserializ restore an account var from an serialized bytes
type Address ¶
type Address [AddressLength]byte
Address definition
func ChainCoordinateToAddress ¶
func ChainCoordinateToAddress(cc coordinate.ChainCoordinate) Address
ChainCoordinateToAddress return the publicaccount address of the specified chain by chaincoordinate
func HexToAddress ¶
HexToAddress creates address from address string
func PublicKeyToAddress ¶
PublicKeyToAddress generate address from the public key
func (Address) MarshalText ¶
MarshalText returns the hex representation of a.
func (*Address) UnmarshalText ¶
UnmarshalText parses a hash in hex syntax.
type URL ¶
type URL struct { Scheme string // Protocol scheme to identify a capable account backend Path string // Path for the backend to identify a unique entity }
URL definition
func (URL) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface.
func (URL) TerminalString ¶
TerminalString implements the log.TerminalStringer interface.
Click to show internal directories.
Click to hide internal directories.