accountmanager

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: AGPL-3.0 Imports: 16 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 the gateway in determining the appropriate account to use to send a request for selected user when multiple accounts are registered

func NewAccountManager

func NewAccountManager(userID string, unauthedClient rpc.Client, hostRPCBindAddressWS string, storage storage.Storage, 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 Ten 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