wallet

package
v0.0.0-...-57c8b1d Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MINOUTPUT uint64 = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainIndex

type ChainIndex []*chainhash.Hash

func (ChainIndex) FindBlock

func (activeChain ChainIndex) FindBlock(hash *chainhash.Hash) int

type Utxo

type Utxo struct {
	TxHash   chainhash.Hash
	Outpoint uint32
	Value    uint64
	PkScript []byte
}

func UtxoFromBytes

func UtxoFromBytes(b []byte) Utxo

func (Utxo) Bytes

func (u Utxo) Bytes() []byte

type Wallet

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

func NewWallet

func NewWallet(params *chaincfg.Params, rescanBlocks int) (*Wallet, error)

func (*Wallet) AddInputsAndChange

func (w *Wallet) AddInputsAndChange(tx *wire.MsgTx, totalValueNeeded uint64) error

func (*Wallet) AddNewBlockListener

func (w *Wallet) AddNewBlockListener(blockChan chan *wire.MsgBlock)

func (*Wallet) Balance

func (w *Wallet) Balance() uint64

func (*Wallet) BlockLoop

func (w *Wallet) BlockLoop()

func (*Wallet) Commit

func (w *Wallet) Commit(commitment []byte) (*chainhash.Hash, []byte, error)

func (*Wallet) FindUtxoFromTxIn

func (w *Wallet) FindUtxoFromTxIn(txi *wire.TxIn) (Utxo, error)

func (*Wallet) Height

func (w *Wallet) Height() int

func (*Wallet) HeightOfBlock

func (w *Wallet) HeightOfBlock(blockHash chainhash.Hash) int

func (*Wallet) IsSynced

func (w *Wallet) IsSynced() bool

func (*Wallet) SignMyInputs

func (w *Wallet) SignMyInputs(tx *wire.MsgTx) error

Jump to

Keyboard shortcuts

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