Documentation ¶
Index ¶
Constants ¶
View Source
const ChecksumLength = 2
View Source
const DigestSize = sha512.Size256
DigestSize is the number of bytes in the preferred hash Digest used here.
View Source
const PublicKeySize = 32
Variables ¶
View Source
var ( ErrorInvalidHashLength = errors.New("Invalid hash length!") ErrorInvalidAddress = errors.New("Invalid address!") )
View Source
var (
Default = AddressDecoderV2{}
)
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address Digest
func (Address) GetChecksumAddress ¶
func (addr Address) GetChecksumAddress() *ChecksumAddress
GetChecksumAddress returns the short address with its checksum as a string Checksum in traim are the last 2 bytes of the checksum
type AddressDecoderV2 ¶
type AddressDecoderV2 struct { }
AddressDecoderV2
func (*AddressDecoderV2) AddressEncode ¶
func (dec *AddressDecoderV2) AddressEncode(address []byte) (string, error)
AddressEncode encode address bytes
type ChecksumAddress ¶
type ChecksumAddress struct {
// contains filtered or unexported fields
}
func (*ChecksumAddress) String ¶
func (addr *ChecksumAddress) String() string
String returns a string representation of ChecksumAddress
type Digest ¶
type Digest [DigestSize]byte
Digest represents a 32-byte value holding the 256-bit Hash digest.
type PublicKey ¶
type PublicKey [PublicKeySize]byte
Click to show internal directories.
Click to hide internal directories.