coz

package
v0.0.0-...-cbe201a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimResponse

type ClaimResponse struct {
	Address string `json:"address"`
	Claims  []struct {
		Claim  int    `json:"claim"`
		End    int    `json:"end"`
		Index  int    `json:"index"`
		Start  int    `json:"start"`
		Sysfee int    `json:"sysfee"`
		Txid   string `json:"txid"`
		Value  int    `json:"value"`
	} `json:"claims"`
	Net               string `json:"net"`
	TotalClaim        int    `json:"total_claim"`
	TotalUnspentClaim int    `json:"total_unspent_claim"`
}

type CoZUnspent

type CoZUnspent struct {
	Index int     `json:"index"`
	Txid  string  `json:"txid"`
	Value float64 `json:"value"`
}

type CozClient

type CozClient struct {
	Endpoint url.URL
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string) *CozClient

func (*CozClient) GetClaims

func (c *CozClient) GetClaims(address string) (*ClaimResponse, error)

func (*CozClient) GetUnspentByAddress

func (c *CozClient) GetUnspentByAddress(address string) (*UnspentBalance, error)

type CozClientInterface

type CozClientInterface interface {
	GetUnspentByAddress(address string) (*UnspentBalance, error)
	GetClaims(address string) (*ClaimResponse, error)
}

type UnspentBalance

type UnspentBalance struct {
	GAS struct {
		Balance float64      `json:"balance"`
		Unspent []CoZUnspent `json:"unspent"`
	} `json:"GAS"`
	NEO struct {
		Balance int          `json:"balance"`
		Unspent []CoZUnspent `json:"unspent"`
	} `json:"NEO"`
	Address string `json:"address"`
	Net     string `json:"net"`
}

Jump to

Keyboard shortcuts

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