status

package
v0.66.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MPL-2.0 Imports: 12 Imported by: 5

Documentation

Overview

Package status is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountManager

type AccountManager interface {
	AddressToDecryptedAccount(string, string) (types.Account, *types.Key, error)
	SelectAccount(account.LoginParams) error
	CreateAccount(password string) (mkInfo generator.GeneratedAccountInfo, accountInfo account.Info, mnemonic string, err error)
}

AccountManager interface to manage account actions

type CreateAddressResponse added in v0.35.0

type CreateAddressResponse struct {
	Address string `json:"address"`
	Pubkey  string `json:"pubkey"`
	Privkey string `json:"privkey"`
}

CreateAddressResponse : json response returned by status_createaccount

type LoginRequest

type LoginRequest struct {
	Addr     string `json:"address"`
	Password string `json:"password"`
}

LoginRequest : json request for status_login.

type LoginResponse

type LoginResponse struct {
	AddressKeyID string `json:"address_key_id"`
}

LoginResponse : json response returned by status_login.

type MockAccountManager

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

MockAccountManager is a mock of AccountManager interface

func NewMockAccountManager

func NewMockAccountManager(ctrl *gomock.Controller) *MockAccountManager

NewMockAccountManager creates a new mock instance

func (*MockAccountManager) AddressToDecryptedAccount

func (m *MockAccountManager) AddressToDecryptedAccount(arg0, arg1 string) (types.Account, *types.Key, error)

AddressToDecryptedAccount mocks base method

func (*MockAccountManager) CreateAccount

CreateAccount mocks base method

func (*MockAccountManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockAccountManager) SelectAccount

func (m *MockAccountManager) SelectAccount(arg0 account.LoginParams) error

SelectAccount mocks base method

type MockAccountManagerMockRecorder

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

MockAccountManagerMockRecorder is the mock recorder for MockAccountManager

func (*MockAccountManagerMockRecorder) AddressToDecryptedAccount

func (mr *MockAccountManagerMockRecorder) AddressToDecryptedAccount(arg0, arg1 interface{}) *gomock.Call

AddressToDecryptedAccount indicates an expected call of AddressToDecryptedAccount

func (*MockAccountManagerMockRecorder) CreateAccount

func (mr *MockAccountManagerMockRecorder) CreateAccount(password interface{}) *gomock.Call

CreateAccount indicates an expected call of CreateAccount

func (*MockAccountManagerMockRecorder) SelectAccount

func (mr *MockAccountManagerMockRecorder) SelectAccount(arg0 interface{}) *gomock.Call

SelectAccount indicates an expected call of SelectAccount

type MockWhisperService

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

MockWhisperService is a mock of WhisperService interface

func NewMockWhisperService

func NewMockWhisperService(ctrl *gomock.Controller) *MockWhisperService

NewMockWhisperService creates a new mock instance

func (*MockWhisperService) AddKeyPair

func (m *MockWhisperService) AddKeyPair(key *ecdsa.PrivateKey) (string, error)

AddKeyPair mocks base method

func (*MockWhisperService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

type MockWhisperServiceMockRecorder

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

MockWhisperServiceMockRecorder is the mock recorder for MockWhisperService

func (*MockWhisperServiceMockRecorder) AddKeyPair

func (mr *MockWhisperServiceMockRecorder) AddKeyPair(key interface{}) *gomock.Call

AddKeyPair indicates an expected call of AddKeyPair

type PublicAPI

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

PublicAPI represents a set of APIs from the `web3.status` namespace.

func NewAPI

func NewAPI(s *Service) *PublicAPI

NewAPI creates an instance of the status API.

func (*PublicAPI) CreateAddress added in v0.35.0

func (api *PublicAPI) CreateAddress(context context.Context) (res CreateAddressResponse, err error)

CreateAddress is an implementation of `status_createaccount` or `web3.status.createaccount` API

func (*PublicAPI) Login

func (api *PublicAPI) Login(context context.Context, req LoginRequest) (res LoginResponse, err error)

Login is an implementation of `status_login` or `web3.status.login` API

func (*PublicAPI) Signup

func (api *PublicAPI) Signup(context context.Context, req SignupRequest) (res SignupResponse, err error)

Signup is an implementation of `status_signup` or `web3.status.signup` API

type Service

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

Service represents our own implementation of status status operations.

func New

func New(w WhisperService) *Service

New returns a new Service.

func (*Service) APIs

func (s *Service) APIs() []rpc.API

APIs returns a list of new APIs.

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols returns a new protocols list. In this case, there are none.

func (*Service) SetAccountManager

func (s *Service) SetAccountManager(a AccountManager)

SetAccountManager sets account manager for the API calls.

func (*Service) Start

func (s *Service) Start(server *p2p.Server) error

Start is run when a service is started. It does nothing in this case but is required by `node.Service` interface.

func (*Service) Stop

func (s *Service) Stop() error

Stop is run when a service is stopped. It does nothing in this case but is required by `node.Service` interface.

type SignupRequest

type SignupRequest struct {
	Password string `json:"password"`
}

SignupRequest : json request for status_signup.

type SignupResponse

type SignupResponse struct {
	Address       string `json:"address"`
	Pubkey        string `json:"pubkey"`
	WalletAddress string `json:"walletAddress"`
	WalletPubkey  string `json:"walletPubKey"`
	ChatAddress   string `json:"chatAddress"`
	ChatPubkey    string `json:"chatPubkey"`
	Mnemonic      string `json:"mnemonic"`
}

SignupResponse : json response returned by status_signup.

type WhisperService

type WhisperService interface {
	AddKeyPair(key *ecdsa.PrivateKey) (string, error)
}

WhisperService whisper interface to add key pairs

Jump to

Keyboard shortcuts

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