common

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexStringToTX

func HexStringToTX(tx string) (*wire.MsgTx, error)

func ReverseBytes

func ReverseBytes(s []byte)

Types

type PayoutMap

type PayoutMap struct {
	CreditIDs []int
	UserID    int
	Address   string
	Amount    int64
	MinerFee  int64

	AddressObj btcutil.Address `json:"-"`
}

Contains information the

type PayoutMeta

type PayoutMeta struct {
	ChangeAddress string
	PayoutMaps    map[int]*PayoutMap `json:"payout_maps"`
	Inputs        []UTXO
}

A type we use to pass payout transaction metadata between ngweb and ngsigner

type StratumClientStatus

type StratumClientStatus struct {
	Username   string  `json:"username"`
	Hashrate   float64 `json:"hashrate"`
	Name       string  `json:"name"`
	Difficulty float64 `json:"difficulty"`
}

type StratumStatus

type StratumStatus struct {
	Clients []StratumClientStatus `json:"clients"`
}

type UTXO

type UTXO struct {
	Hash    string
	Vout    uint32
	Amount  int64
	Address string
}

Pass UTXO information (address mostly) to ngsigner for signing. Also for decoding from database

type Window

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

func NewWindow

func NewWindow(size int) Window

func (*Window) Add

func (w *Window) Add(val float64)

func (*Window) Rate

func (w *Window) Rate(interval time.Duration) float64

func (*Window) RateMinute

func (w *Window) RateMinute() float64

func (*Window) RateSecond

func (w *Window) RateSecond() float64

Jump to

Keyboard shortcuts

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