btc

package
v0.0.0-...-452d5d4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_ACCOUNT = "duckduck"

default account for reserved usage, which represent account belongs to enterpise default

View Source
var DEFAULT_CONFIRMATION = 6

default confirmation

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(host, user, pass, logDir string) (*Client, error)

connect to bitcoind with HTTP RPC transport

func (*Client) CreateAccount

func (client *Client) CreateAccount(account string) (keeper.Account, error)

Create Account Returns customized account info

func (*Client) GetAccountInfo

func (client *Client) GetAccountInfo(account string, minConf int) (keeper.Account, error)

GetAccountInfo

func (*Client) GetAddress

func (client *Client) GetAddress(account string) (string, error)

GetAddress - default address

func (*Client) GetAddressesByAccount

func (client *Client) GetAddressesByAccount(account string) ([]string, error)

GetAddressesByAccount

func (*Client) GetBlockCount

func (client *Client) GetBlockCount() (int64, error)

GetBlockCount

func (*Client) GetNewAddress

func (client *Client) GetNewAddress(account string) (string, error)

TODO GetNewAddress does map to `getnewaddress` rpc call now rpcclient doesn't have such golang wrapper func.

func (*Client) ListAccountsMinConf

func (client *Client) ListAccountsMinConf(minConf int) (map[string]float64, error)

ListAccountsMinConf

func (*Client) ListUnspentMin

func (client *Client) ListUnspentMin(minConf int) ([]btcjson.ListUnspentResult, error)

ListUnspentMin

func (*Client) Move

func (client *Client) Move(from, to string, amount float64) (bool, error)

Move

func (*Client) Ping

func (client *Client) Ping() error

Ping

func (*Client) SendFrom

func (client *Client) SendFrom(account, address string, amount float64) (string, error)

TODO check validity of account and have sufficent balance

func (*Client) SendToAddress

func (client *Client) SendToAddress(address string, amount float64) (string, error)

SendToAddress

Jump to

Keyboard shortcuts

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