Added ui.Interface to xeth

This commit is contained in:
obscuren
2015-03-09 13:49:14 +01:00
parent 21fd722abc
commit 738d6e20f2
2 changed files with 18 additions and 15 deletions

View File

@ -1,18 +1,8 @@
package ui
// ReturnInterface is returned by the Intercom interface when a method is called
type ReturnInterface interface {
Get(i int) (interface{}, error)
Size() int
}
import "github.com/ethereum/go-ethereum/core/types"
// Frontend is the basic interface for calling arbitrary methods on something that
// implements a front end (GUI, CLI, etc)
type Frontend interface {
// Checks whether a specific method is implemented
Supports(method string) bool
// Call calls the given method on interface it implements. This will return
// an error with errNotImplemented if the method hasn't been implemented
// and will return a ReturnInterface if it does.
Call(method string) (ReturnInterface, error)
type Interface interface {
UnlockAccount(address []byte) bool
ConfirmTransaction(tx *types.Transaction) bool
}