wallet

package
v0.0.0-...-8aeb7b2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLocalConn = 1 << 10
View Source
const PipeDialTimeOut = time.Second * 2
View Source
const RechargeTimeInterval = time.Minute * 5
View Source
const ServeNodeSep = "@"
View Source
const ServeNodeTimeOut = time.Second * 2

Variables

View Source
var CreditLocal int64

Functions

func CreatePayBill

func CreatePayBill(user, miner string, usage int, priKey ed25519.PrivateKey) (*rpcMsg.UserCreditPay, error)

func IsIPAddr

func IsIPAddr(ip string) bool

Types

type ControlPipe

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

func NewPipe

func NewPipe(l net.Conn, r *network.PipeConn, rc chan int, tgt string) *ControlPipe

func (*ControlPipe) String

func (p *ControlPipe) String() string

type InternetAddress

type InternetAddress struct {
	IP  string
	Mac string
}

type PacketBucket

type PacketBucket struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type ServeNodeId

type ServeNodeId struct {
	ID   account.ID
	IP   string
	Ping time.Duration
}

func ParseService

func ParseService(path string) *ServeNodeId

func (*ServeNodeId) String

func (m *ServeNodeId) String() string

func (*ServeNodeId) TONetAddr

func (m *ServeNodeId) TONetAddr() string

func (*ServeNodeId) TestTTL

func (m *ServeNodeId) TestTTL(saver func(fd uintptr)) bool

type UserWallet

type UserWallet interface {
	Running(done chan error)
	Finish()
}

type WConfig

type WConfig struct {
	BCAddr     string
	Cipher     string
	SettingUrl string
	ServerId   *ServeNodeId
	Saver      func(fd uintptr)
	Ip         string
	Mac        string
}

func (*WConfig) String

func (c *WConfig) String() string

type Wallet

type Wallet struct {
	*PacketBucket
	*InternetAddress
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet(conf *WConfig, password string) (*Wallet, error)

func (*Wallet) Finish

func (w *Wallet) Finish()

func (*Wallet) Running

func (w *Wallet) Running(done chan error)

func (*Wallet) ToString

func (w *Wallet) ToString() string

Jump to

Keyboard shortcuts

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