useragent

package
v0.9.35-0...-34b622a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

package user agent provides frontends and agents which can interact with the user

Index

Constants

This section is empty.

Variables

View Source
var (
	AskPasswordMethod        = "agent_askPassword"
	ConfirmTransactionMethod = "agent_confirmTransaction"
	EnableUserAgentMethod    = "admin_enableUserAgent"
)

Functions

This section is empty.

Types

type RemoteFrontend

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

remoteFrontend implements xeth.Frontend and will communicate with an external user agent over a connection

func NewRemoteFrontend

func NewRemoteFrontend(conn net.Conn, mgr *accounts.Manager) *RemoteFrontend

NewRemoteFrontend creates a new frontend which will interact with an user agent over the given connection

func (*RemoteFrontend) AskPassword

func (fe *RemoteFrontend) AskPassword() (string, bool)

func (*RemoteFrontend) ConfirmTransaction

func (fe *RemoteFrontend) ConfirmTransaction(tx string) bool

ConfirmTransaction asks the user for approval

func (*RemoteFrontend) Enable

func (fe *RemoteFrontend) Enable()

Enable will enable user interaction

func (*RemoteFrontend) UnlockAccount

func (fe *RemoteFrontend) UnlockAccount(address []byte) bool

UnlockAccount asks the user agent for the user password and tries to unlock the account. It will try 3 attempts before giving up.

Jump to

Keyboard shortcuts

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