wallet

package
v0.0.0-...-2f442fc Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SigHashForkID txscript.SigHashType = 0x40

Variables

View Source
var MainNetParams = chaincfg.MainNetParams
View Source
var MainNetParamsOld = chainCfgOld.MainNetParams

Functions

This section is empty.

Types

type Address

type Address struct {
	// contains filtered or unexported fields
}

func GetAddress

func GetAddress(pubKey []byte) Address

func GetAddressFromPkHash

func GetAddressFromPkHash(pkHash []byte) Address

func GetAddressFromString

func GetAddressFromString(addressString string) Address

func (Address) GetAddress

func (a Address) GetAddress() btcutil.Address

func (Address) GetEncoded

func (a Address) GetEncoded() string

func (Address) GetScriptAddress

func (a Address) GetScriptAddress() []byte

type Block

type Block struct {
	Hash       *chainhash.Hash
	MerkleRoot *chainhash.Hash
}
var GenesisBlock Block

type KeyDB

type KeyDB struct {
	Keys map[string]*btcec.PrivateKey
}

func (KeyDB) GetKey

func (k KeyDB) GetKey(addr btcutil.Address) (*btcec.PrivateKey, bool, error)

type PrivateKey

type PrivateKey struct {
	Secret []byte
}

func GeneratePrivateKey

func GeneratePrivateKey() PrivateKey

func GetPrivateKey

func GetPrivateKey(secretHex string) PrivateKey

func ImportPrivateKey

func ImportPrivateKey(wifString string) (PrivateKey, error)

func (PrivateKey) GetBase58

func (k PrivateKey) GetBase58() string

func (PrivateKey) GetBase58Compressed

func (k PrivateKey) GetBase58Compressed() string

func (PrivateKey) GetBinaryString

func (k PrivateKey) GetBinaryString() string

func (PrivateKey) GetBtcEcPrivateKey

func (k PrivateKey) GetBtcEcPrivateKey() *btcec.PrivateKey

func (PrivateKey) GetHex

func (k PrivateKey) GetHex() string

func (PrivateKey) GetHexCompressed

func (k PrivateKey) GetHexCompressed() string

func (PrivateKey) GetPublicKey

func (k PrivateKey) GetPublicKey() PublicKey

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

func GetPublicKey

func GetPublicKey(pkBytes []byte) PublicKey

func (PublicKey) GetAddress

func (k PublicKey) GetAddress() Address

func (PublicKey) GetSerialized

func (k PublicKey) GetSerialized() []byte

func (PublicKey) GetSerializedString

func (k PublicKey) GetSerializedString() string

type ScriptDb

type ScriptDb struct{}

func (ScriptDb) GetScript

func (s ScriptDb) GetScript(btcutil.Address) ([]byte, error)

type Wallet

type Wallet struct {
	Entropy    []byte
	Passphrase string
}

func GetWallet

func GetWallet(mnemonicPhrase string, passphrase string) (Wallet, error)

func (*Wallet) GetEntropy

func (w *Wallet) GetEntropy() string

func (*Wallet) GetSeed

func (w *Wallet) GetSeed() (string, error)

Jump to

Keyboard shortcuts

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