lwallet

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: BSD-2-Clause Imports: 26 Imported by: 0

Documentation

Overview

Package lwallet implements logic of the wallet It is not a complete wallet and only provides basic testing capabilities for rpc currently

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToWallet

func AddToWallet(txn *tx.Tx, blockhash util.Hash, extInfo map[string]string)

func CheckFinalTx

func CheckFinalTx(txn *tx.Tx) bool

func CommitTransaction

func CommitTransaction(txNew *tx.Tx, extInfo map[string]string) error

func CreateMultiSigRedeemScript added in v0.0.4

func CreateMultiSigRedeemScript(requiredNum int, keys []string) (res *script.Script, err error)

func CreateTransaction

func CreateTransaction(recipients []*wallet.Recipient, changePosInOut *int, sign bool) (*tx.Tx,
	amount.Amount, error)

func FundTransaction

func FundTransaction(fundTx *tx.Tx, setSubtractFeeFromOutputs *set.Set, options *btcjson.FundRawTxoptions) (
	int, amount.Amount, error)

func GetAccountName

func GetAccountName(keyHash []byte) string

func GetKeyPair

func GetKeyPair(pubKeyHash []byte) *crypto.KeyPair

func GetKeyPairs

func GetKeyPairs(pubKeyHashList [][]byte) []*crypto.KeyPair

func GetMiningAddress

func GetMiningAddress() (string, error)

func GetNewAddress

func GetNewAddress(account string, isLegacyAddr bool) (string, error)

func GetScript

func GetScript(scriptHash []byte) *script.Script

func IsMine

func IsMine(sc *script.Script) bool

func IsWalletEnable

func IsWalletEnable() bool

func RemoveFromWallet

func RemoveFromWallet(txn *tx.Tx)

func SetFeeRate

func SetFeeRate(feePaid int64, byteSize int64)

Types

type TxnCoin

type TxnCoin struct {
	OutPoint *outpoint.OutPoint
	Coin     *utxo.Coin
	IsSafe   bool
}

func AvailableCoins

func AvailableCoins(onlySafe bool, includeZeroValue bool) []*TxnCoin

func SelectCoinsMinConf

func SelectCoinsMinConf(targetValue amount.Amount, confMine int, confTheirs int,
	maxAncestors int, coins []*TxnCoin) ([]*TxnCoin, amount.Amount)

Jump to

Keyboard shortcuts

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