cross_shard

package
Version: v0.0.0-...-3395c3e Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignatureFunc

type SignatureFunc func(address string) (pubKey, signature string, err error)

type UTXOClient

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

func New

func New(hostsAndPorts map[uint32]string, useHTTPS bool, sigFunc SignatureFunc) (c *UTXOClient, err error)

func (*UTXOClient) GetByHashes

func (c *UTXOClient) GetByHashes(shardID uint32, address string, hashes ...string) (utxos txmodels.UTXORows, 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) 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. The list of UTXOs returned is sorted from the smallest one to the biggest one.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL