accountmanager

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: AGPL-3.0 Imports: 14 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) GetAllAddressesWithClients

func (m *AccountManager) GetAllAddressesWithClients() []string

GetAllAddressesWithClients returns a list of addresses which already have clients (are in accountClients map)

func (*AccountManager) ProxyRequest

func (m *AccountManager) ProxyRequest(rpcReq *wecommon.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

Jump to

Keyboard shortcuts

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