address_decode

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ChecksumLength = 4
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 Algorand are the last 4 bytes of the shortAddress Hash. H(Address)[28:]

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.

func Hash

func Hash(data []byte) Digest

Hash computes the SHASum512_256 hash of an array of bytes

type PublicKey

type PublicKey [PublicKeySize]byte

Jump to

Keyboard shortcuts

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