blackbox

package
v0.0.0-...-20f12cd Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	PublicKey string  `json:"public_key"`
	Balance   Balance `json:"balance"`
}

type Balance

type Balance struct {
	Available decimal.Decimal `json:"available"`
	Pending   decimal.Decimal `json:"pending"`
	Locked    decimal.Decimal `json:"locked"`
}

type Client

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

func NewClient

func NewClient(url string, token string, debug bool) (*Client, error)

NewClient ...

func (*Client) AddressCreate

func (c *Client) AddressCreate(chain string, request CreateAddressRequest) (*Address, error)

func (*Client) AddressList

func (c *Client) AddressList(chain string) ([]Address, error)

func (*Client) AddressRecreate

func (c *Client) AddressRecreate(chain string, count int) (map[string]string, error)

func (*Client) Init

func (c *Client) Init(request InitRequest) (*InitResponse, error)

func (*Client) Login

func (c *Client) Login(password string, save bool) (*LoginResponse, error)

func (*Client) Logout

func (c *Client) Logout() error

func (*Client) MasternodeList

func (c *Client) MasternodeList(chain string) (interface{}, error)

func (*Client) Status

func (c *Client) Status() (interface{}, error)

func (*Client) SystemStatus

func (c *Client) SystemStatus() (interface{}, error)

func (*Client) SystemUpdate

func (c *Client) SystemUpdate() (interface{}, error)

func (*Client) Upgrade

func (c *Client) Upgrade() (interface{}, error)

func (*Client) UpgradeStatus

func (c *Client) UpgradeStatus() (*UpgradeStatus, error)

type CreateAddressRequest

type CreateAddressRequest struct {
	Rescan    bool `json:"rescan"`
	Watchonly bool `json:"watchonly"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

type InitRequest

type InitRequest struct {
	Mnemonic         string `json:"mnemonic"`
	MnemonicPassword string `json:"mnemonic_password"`
	Password         string `json:"password"`
	Email            string `json:"email"`
	Force            bool   `json:"force"`
}

type InitResponse

type InitResponse struct {
	Mnemonic string `json:"mnemonic"`
}

type LoginResponse

type LoginResponse struct {
	JWT string `json:"jwt"`
}

type PivxStatus

type PivxStatus struct {
	Blockchain struct {
		Balance       float64 `json:"balance"`
		StakingStatus string  `json:"staking status" mapstructure:"staking status"`
	} `json:"blockchain"`
	SyncProgress string `json:"sync_progress" mapstructure:"sync_progress"`
}

type UpgradeStatus

type UpgradeStatus struct {
	Upgradeable bool   `json:"updateable"`
	Installed   string `json:"installed"`
	Candidate   string `json:"candidate"`
}

Jump to

Keyboard shortcuts

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