hd

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-3.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrBytesFromPubKeyBytes

func AddrBytesFromPubKeyBytes(pubKeyBytes []byte) (addrBytes []byte, checksum []byte)

func AddrFromPubKeyBytes

func AddrFromPubKeyBytes(pubKeyBytes []byte) string

This returns a Bitcoin-like address.

func CalcHash

func CalcHash(buf []byte, hasher hash.Hash) []byte

Calculate the hash of hasher over buf.

func CalcHash160

func CalcHash160(buf []byte) []byte

calculate hash160 which is ripemd160(sha256(data))

func CalcHash256

func CalcHash256(buf []byte) []byte

calculate hash256 which is sha256(sha256(data))

func CalcSha512

func CalcSha512(buf []byte) []byte

calculate sha512(data)

func ComputeAddress

func ComputeAddress(pubKeyHex string, chainHex string, path string, index int32) string

func ComputeAddressForPrivKey

func ComputeAddressForPrivKey(privKey string) string

func ComputeMastersFromSeed

func ComputeMastersFromSeed(seed string) (string, string, string, string)

returns MPK, Chain, and master secret in hex.

func ComputePrivateKey

func ComputePrivateKey(mprivHex string, chainHex string, path string, index int32) string

func ComputeTxId

func ComputeTxId(rawTxHex string) string

func ComputeWIF

func ComputeWIF(privKey string, compress bool) string

func DerivePrivateKey

func DerivePrivateKey(privKeyBytes []byte, chain []byte, i uint32, prime bool) ([]byte, []byte)

func DerivePrivateKeyForPath

func DerivePrivateKeyForPath(privKeyBytes []byte, chain []byte, path string) []byte

func DerivePublicKey

func DerivePublicKey(pubKeyBytes []byte, chain []byte, i uint32) ([]byte, []byte)

func DerivePublicKeyForPath

func DerivePublicKeyForPath(pubKeyBytes []byte, chain []byte, path string) []byte

func HexDecode

func HexDecode(str string) []byte

func HexEncode

func HexEncode(b []byte) string

func I64

func I64(key []byte, data []byte) ([]byte, []byte)

func PubKeyBytesFromPrivKeyBytes

func PubKeyBytesFromPrivKeyBytes(privKeyBytes []byte, compress bool) (pubKeyBytes []byte)

func ReverseBytes

func ReverseBytes(buf []byte) []byte

func SignMessage

func SignMessage(privKey string, message string, compress bool) string

func WIFFromPrivKeyBytes

func WIFFromPrivKeyBytes(privKeyBytes []byte, compress bool) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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