wallet

package
v0.0.0-...-4782c31 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 13 Imported by: 3

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

This section is empty.

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 LeftPipe

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

func NewPipe

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

func (*LeftPipe) PullDataFromServer

func (p *LeftPipe) PullDataFromServer()

func (*LeftPipe) String

func (p *LeftPipe) String() 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 WConfig

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

func (*WConfig) String

func (c *WConfig) String() string

type Wallet

type Wallet struct {
	*PacketBucket
	// 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) SetupPipe

func (w *Wallet) SetupPipe(lConn net.Conn, tgtAddr string) *LeftPipe

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