navpool

package
v0.0.0-...-a5fc328 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorPoolConnectionError = errors.New("Could not connect to the NavPool API")
)

Functions

This section is empty.

Types

type CommunityFund

type CommunityFund struct {
	Available float64 `json:"available"`
	Locked    float64 `json:"locked"`
}

type Info

type Info struct {
	Version            int           `json:"version"`
	ProtocolVersion    int           `json:"protocolversion"`
	WalletVersion      int           `json:"walletversion"`
	Balance            float64       `json:"balance"`
	ColdStakingBalance float64       `json:"coldstaking_balance"`
	NewMint            float64       `json:"newmint"`
	Stake              float64       `json:"stake"`
	Blocks             int           `json:"blocks"`
	CommunityFund      CommunityFund `json:"communityfund"`
	TimeOffset         int           `json:"timeoffset"`
	NtpTimeOffset      int           `json:"ntptimeoffset"`
	Connections        int           `json:"connections"`
	Proxy              string        `json:"proxy"`
	TestNet            bool          `json:"testnet"`
	KeyPoolOldest      int           `json:"keypoololdest"`
	KeyPoolSize        int           `json:"keypoolsize"`
	UnlockedUntil      int           `json:"unlocked_until"`
	PayTxFee           float64       `json:"paytxfee"`
	RelayFee           float64       `json:"relayfee"`
	Errors             string        `json:"errors"`
}

type PoolAddress

type PoolAddress struct {
	SpendingAddress    string `json:"spendingAddress"`
	StakingAddress     string `json:"stakingAddress"`
	ColdStakingAddress string `json:"coldStakingAddress"`
}

type PoolApi

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

func NewPoolApi

func NewPoolApi(host string, network string) (*PoolApi, error)

func (*PoolApi) GetInfo

func (e *PoolApi) GetInfo() (info Info, err error)

func (*PoolApi) GetPoolAddress

func (e *PoolApi) GetPoolAddress(spendingAddress string, signature string) (address PoolAddress, err error)

func (*PoolApi) GetStakingInfo

func (e *PoolApi) GetStakingInfo() (stakingInfo StakingInfo, err error)

func (*PoolApi) PaymentRequestVote

func (e *PoolApi) PaymentRequestVote(spendingAddress string, hash string, vote string) (err error)

func (*PoolApi) ProposalVote

func (e *PoolApi) ProposalVote(spendingAddress string, hash string, vote string) (err error)

type PoolClient

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

func NewClient

func NewClient(host string, network string) (c *PoolClient, err error)

type StakingInfo

type StakingInfo struct {
	Enabled          bool    `json:"enabled"`
	Staking          bool    `json:"staking"`
	Errors           string  `json:"errors"`
	CurrentBlockSize int     `json:"currentblocksize"`
	CurrentBlockTx   int     `json:"currentblocktx"`
	Difficulty       float64 `json:"difficulty"`
	SearchInterval   int     `json:"search-interval"`
	Weight           int     `json:"weight"`
	NetStakeWeight   int     `json:"netstakeweight"`
	ExpectedTime     int     `json:"expectedtime"`
}

Jump to

Keyboard shortcuts

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