coinselect

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coins

type Coins struct {
	Utxos        []explorer.Utxo
	BlindingKey  []byte
	BlindingKeys [][]byte
}

Coins defines the struct thta holds utxos and relative blinding keys.

func (*Coins) CoinSelect

func (cs *Coins) CoinSelect(amount uint64, asset string) (unspents []explorer.Utxo, change uint64, err error)

CoinSelect returns the utxos that satisfies the target amount and target asset. TODO implement branch and bound algorithm.

Jump to

Keyboard shortcuts

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