lib

package
v0.2.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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(address wallet.Addr) (int64, error)

func (*Client) GetUtxos

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

type Database

type Database interface {
	GetAddressBalance(wallet.Addr) (int64, error)
	GetAddressLastUpdate(wallet.Addr) (time.Time, error)
	GetUtxos(wallet.Addr) ([]graph.Output, error)
	SaveTxs([]graph.Tx) error
	SetAddressLastUpdate(wallet.Addr, time.Time) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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