address

package
v0.0.0-...-1f6f007 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version            = byte(0x00)
	AddressChecksumLen = 4
)

Variables

This section is empty.

Functions

func Base58Decode

func Base58Decode(input []byte) []byte

Base58Decode decodes Base58-encoded data

func Base58Encode

func Base58Encode(input []byte) []byte

Base58Encode encodes a byte array to Base58

func HashPubKey

func HashPubKey(pubKey []byte) []byte

HashPubKey hashes public key

func ReverseBytes

func ReverseBytes(data []byte)

ReverseBytes reverses a byte array

func ValidateAddress

func ValidateAddress(address string) bool

ValidateAddress check if address if valid

Types

type Address

type Address struct {
	PrivateKey ecdsa.PrivateKey
	PublicKey  []byte
}

Address stores private and public keys

func NewAddress

func NewAddress() *Address

NewAddress creates and returns a Address

func (Address) GetAddress

func (w Address) GetAddress() []byte

GetAddress returns Address address

Jump to

Keyboard shortcuts

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