address

package
v0.0.0-...-d373653 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: BSD-3-Clause Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBase58

func FromBase58(s string) ([]byte, error)

Validates checksum and strips it from result

func FromBase58Raw

func FromBase58Raw(src string) (dst []byte)

encodes base58 string into bytes

func Hash160

func Hash160(in []byte) []byte

func Hash256

func Hash256(in []byte) []byte

func ToBase58

func ToBase58(b []byte, l int) string

Adds a checksum to bytes before converting to base58

func ToBase58Raw

func ToBase58Raw(val []byte, len int) string

encodes bytes into base58 string

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	D *big.Int
}

func NewPrivateKey

func NewPrivateKey(seed io.Reader) (p *PrivateKey, err error)

func ReadPrivateKey

func ReadPrivateKey(s string) (p *PrivateKey, err error)

func (*PrivateKey) Bytes

func (p *PrivateKey) Bytes() []byte

func (*PrivateKey) IsValid

func (p *PrivateKey) IsValid() bool

func (*PrivateKey) SetBytes

func (p *PrivateKey) SetBytes(b []byte) *PrivateKey

func (*PrivateKey) Sign

func (p *PrivateKey) Sign(m []byte) (s []byte, err error)

func (*PrivateKey) String

func (p *PrivateKey) String() string

type PublicKey

type PublicKey struct {
	*kelliptic.Curve
	X, Y *big.Int
}

func (*PublicKey) Address

func (p *PublicKey) Address() string

func (*PublicKey) AddressBytes

func (p *PublicKey) AddressBytes() []byte

func (*PublicKey) Bytes

func (p *PublicKey) Bytes() []byte

func (*PublicKey) Compress

func (p *PublicKey) Compress() string

func (*PublicKey) CompressBytes

func (p *PublicKey) CompressBytes() []byte

func (*PublicKey) String

func (p *PublicKey) String() string

func (*PublicKey) Verify

func (p *PublicKey) Verify(m, s []byte) bool

Jump to

Keyboard shortcuts

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