accountmanager

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNoViewingKey = "method %s cannot be called with an unauthorised client - no signed viewing keys found"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountManager

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

AccountManager provides a single location for code that helps wallet extension in determining the appropriate account to use to send a request when multiple are registered

func NewAccountManager

func NewAccountManager(unauthedClient rpc.Client, logger gethlog.Logger) *AccountManager

func (*AccountManager) AddClient

func (m *AccountManager) AddClient(address gethcommon.Address, client *rpc.EncRPCClient)

AddClient adds a client to the list of clients, keyed by account address.

func (*AccountManager) ProxyRequest

func (m *AccountManager) ProxyRequest(rpcReq *RPCRequest, rpcResp *interface{}, userConn userconn.UserConn) error

ProxyRequest tries to identify the correct EncRPCClient to proxy the request to the Obscuro node, or it will attempt the request with all clients until it succeeds

type RPCRequest

type RPCRequest struct {
	ID     json.RawMessage
	Method string
	Params []interface{}
}

func (*RPCRequest) Clone

func (r *RPCRequest) Clone() *RPCRequest

Clone returns a new instance of the *RPCRequest

Jump to

Keyboard shortcuts

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