Documentation ¶
Index ¶
- Constants
- type APIClient
- type SignatureFunc
- type UTXOClient
- func (c *UTXOClient) GetForAmount(amount int64, shardID uint32, addresses ...string) (utxos *txmodels.UTXO, err error)
- func (c *UTXOClient) NonSpentUTXOsCnt(address string) (count uint64, err error)
- func (c *UTXOClient) SelectForAmount(amount int64, shardID uint32, addresses ...string) (utxos txmodels.UTXORows, err error)
- func (c *UTXOClient) SelectForAmountWithoutLock(amount int64, shardID uint32, addresses ...string) (utxos txmodels.UTXORows, err error)
Constants ¶
View Source
const ( StrategySmallestFirst = "smallest-first" StrategyBiggestFirst = "biggest-first" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SignatureFunc ¶
type UTXOClient ¶
type UTXOClient struct {
// contains filtered or unexported fields
}
func NewAbstractUTXOClient ¶
func NewAbstractUTXOClient(hostAndPort string, baseURL string, strategy string, sigFunc SignatureFunc) (c *UTXOClient, err error)
func (*UTXOClient) GetForAmount ¶
func (c *UTXOClient) GetForAmount(amount int64, shardID uint32, addresses ...string) (utxos *txmodels.UTXO, err error)
GetForAmount returns at most one UTXO for required `amount`, `shardID` and list of addresses. The list of UTXOs returned is sorted from the smallest one to the biggest one.
func (*UTXOClient) NonSpentUTXOsCnt ¶
func (c *UTXOClient) NonSpentUTXOsCnt(address string) (count uint64, err error)
func (*UTXOClient) SelectForAmount ¶
func (c *UTXOClient) SelectForAmount(amount int64, shardID uint32, addresses ...string) (utxos txmodels.UTXORows, err error)
SelectForAmount returns all found UTXOs for required `amount`, `shardID` and list of addresses.
func (*UTXOClient) SelectForAmountWithoutLock ¶
func (c *UTXOClient) SelectForAmountWithoutLock(amount int64, shardID uint32, addresses ...string) (utxos txmodels.UTXORows, err error)
SelectForAmount returns all found UTXOs for required `amount`, `shardID` and list of addresses.
Click to show internal directories.
Click to hide internal directories.