pess

package
v1.1.28 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultStruct = &Verifier{}
	CoinName      = "pess"
)

for register

View Source
var ErrInvalidChecksum = errors.New("invalid checksum")
View Source
var ErrInvalidVersionByte = errors.New("invalid version byte")

Functions

func Checksum

func Checksum(data []byte) []byte

Checksum returns the 2-byte checksum for the provided data

func Validate

func Validate(data []byte, expected []byte) error

Validate returns an error if the provided checksum does not match the calculated checksum of the provided data

Types

type Verifier

type Verifier struct{}

func (Verifier) IsValid

func (b Verifier) IsValid(address string) bool

type VersionByte

type VersionByte byte
const (
	//VersionByteAccountID is the version byte used for encoded stellar addresses
	VersionByteAccountID VersionByte = 6 << 3 // Base32-encodes to 'G...'
)

Jump to

Keyboard shortcuts

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