utils

package
v0.0.0-...-6d370a6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PubKeyHashAddrID = 0x00                            // starts with 1
	HDPrivateKeyID   = [4]byte{0x04, 0x88, 0xad, 0xe4} // starts with xprv
	HDPublicKeyID    = [4]byte{0x04, 0x88, 0xb2, 0x1e} // starts with xpub

	Params = chaincfg.Params{
		PubKeyHashAddrID: 0x00,
		HDPrivateKeyID:   [4]byte{0x04, 0x88, 0xad, 0xe4},
		HDPublicKeyID:    [4]byte{0x04, 0x88, 0xb2, 0x1e},

		HDCoinType: 0,
	}
)

Functions

func Add2PKH

func Add2PKH(address string) []byte

func JoinURL

func JoinURL(base string, paths ...string) string

TODO: make it better

func PK2Add

func PK2Add(pk []byte, isHash bool) string

convert Serialized compressed publicKey or publicKeyHash to address

Types

This section is empty.

Jump to

Keyboard shortcuts

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