lib

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balance

type Balance struct {
	Balance        int64
	Spendable      int64
	UtxoCount      int
	SpendableCount int
}

type Client

type Client struct {
	GraphUrl string
	Database Database
}

func NewClient

func NewClient(graphUrl string, database Database) *Client

func (*Client) Broadcast

func (c *Client) Broadcast(txRaw string) error

func (*Client) GetBalance

func (c *Client) GetBalance(addresses []wallet.Addr) (*Balance, error)

func (*Client) GetUtxos

func (c *Client) GetUtxos(addresses []wallet.Addr) ([]graph.Output, error)

type Database

type Database interface {
	GetAddressBalance([]wallet.Addr) (*Balance, error)
	GetAddressLastUpdate([]wallet.Addr) ([]graph.AddressUpdate, error)
	GetUtxos([]wallet.Addr) ([]graph.Output, error)
	SaveTxs([]graph.Tx) error
	SetAddressLastUpdate([]graph.AddressUpdate) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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