eth

package
v0.0.0-...-45a46c7 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelDetails

type ChannelDetails struct {
	Nonce         *big.Int
	RemindPackets *big.Int
	Expiration    *big.Int
}

type ContractOnEth

type ContractOnEth interface {
	Close()
	MCVer() *Versions
	UsersUnderPool(address common.Address) []common.Address
	UserData(ua, pool common.Address) *UserData
	AllMinerData(common.Address) []account.ID
	MinerData(account.ID) *MinerData
}

func NewSessionPayment

func NewSessionPayment() ContractOnEth

type MinerData

type MinerData struct {
	ID        int64          `json:"ID"`
	PoolAddr  common.Address `json:"PoolAddr"`
	PayerAddr common.Address `json:"PayerAddr"`
	SubAddr   account.ID     `json:"SubAddr"`
	GTN       *big.Int       `json:"GTN"`
	Zone      string         `json:"Zone"`
}

func (*MinerData) String

func (md *MinerData) String() string

type MinerPoolEthApi

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

func (*MinerPoolEthApi) AllMinerData

func (pc *MinerPoolEthApi) AllMinerData(pool common.Address) []account.ID

func (*MinerPoolEthApi) Close

func (pc *MinerPoolEthApi) Close()

func (*MinerPoolEthApi) MCVer

func (pc *MinerPoolEthApi) MCVer() *Versions

func (*MinerPoolEthApi) MinerData

func (pc *MinerPoolEthApi) MinerData(mid account.ID) *MinerData

func (*MinerPoolEthApi) UserData

func (pc *MinerPoolEthApi) UserData(userAddr, poolAddr common.Address) *UserData

func (*MinerPoolEthApi) UsersUnderPool

func (pc *MinerPoolEthApi) UsersUnderPool(address common.Address) []common.Address

type PoolData

type PoolData struct {
	MainAddr  common.Address `json:"MainAddr"`
	PayerAddr common.Address `json:"PayerAddr"`
	GTN       *big.Int       `json:"GTN"`
	Name      string         `json:"Name"`
	Email     string         `json:"Email"`
	Url       string         `json:"Url"`
}

func (*PoolData) String

func (pd *PoolData) String() string

type SysSetting

type SysSetting struct {
	MBytesPerToken int64    `json:"MBytesPerToken"`
	RefundDuration int64    `json:"RefundDuration"`
	PoolGTN        *big.Int `json:"PoolGTN"`
	MinerGTN       *big.Int `json:"MinerGTN"`
}

func (*SysSetting) String

func (ss *SysSetting) String() string

type UserData

type UserData struct {
	Nonce           int64     `json:"Nonce"`
	TokenBalance    *big.Int  `json:"TokenBalance"`
	RemindPacket    *big.Int  `json:"RemindPacket"`
	Expire          time.Time `json:"Expire"`
	Epoch           int64     `json:"Epoch"`
	ClaimedAmount   *big.Int  `json:"ClaimedAmount"`
	ClaimedMicNonce int64     `json:"ClaimedMicNonce"`
}

func (*UserData) String

func (ud *UserData) String() string

type Versions

type Versions struct {
	PoolVer  int64 `json:"PoolVer"`
	MinerVer int64 `json:"MinerVer"`
	UserVer  int64 `json:"UserVer"`
	SysVer   int64 `json:"SysVer"`
}

func (*Versions) Equal

func (v *Versions) Equal(other *Versions) bool

func (*Versions) String

func (v *Versions) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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