address_decode

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL