tools

package
v0.0.0-...-a4757fd Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBytes

func CopyBytes(byts []byte) []byte

func DetermineExternalAddress

func DetermineExternalAddress(listener net.Listener, lAddrIP, lAddrPort string, skipUPNP bool) (string, error)

func ExpandPath

func ExpandPath(p string) string

func FromBytes

func FromBytes(bs []byte, tx interface{}) error

func Hash

func Hash(o interface{}) []byte

func HashRipemd160

func HashRipemd160(data []byte) ([]byte, error)

func HomeDir

func HomeDir() string

func PbMarshal

func PbMarshal(msg proto.Message) []byte

func PbUnmarshal

func PbUnmarshal(data []byte, msg proto.Message) error

func ProtocolAndAddress

func ProtocolAndAddress(listenAddr string) (string, string)

func SigHash

func SigHash(sigObj CanSign) ([]byte, error)

func SignED25519

func SignED25519(tx CanSign, privkey []byte) ([]byte, error)

func SignSecp256k1

func SignSecp256k1(tx CanSign, privkey []byte) ([]byte, error)

func ToBytes

func ToBytes(tx interface{}) ([]byte, error)

func VeirfyED25519

func VeirfyED25519(tx CanSign, sender, sig []byte) error

func VerifySecp256k1

func VerifySecp256k1(tx CanSign, sender, sig []byte) error

Types

type CanSign

type CanSign interface {
	SigObject() interface{}
}

Jump to

Keyboard shortcuts

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