api

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: MPL-2.0 Imports: 21 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWhisperClearIdentitiesFailure clearing whisper identities has failed.
	ErrWhisperClearIdentitiesFailure = errors.New("failed to clear whisper identities")
	// ErrWhisperIdentityInjectionFailure injecting whisper identities has failed.
	ErrWhisperIdentityInjectionFailure = errors.New("failed to inject identity into Whisper")
)

Functions

func RunAsync

func RunAsync(f func() error) <-chan error

RunAsync runs the specified function asynchronously.

Types

type StatusBackend

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

StatusBackend implements Status.im service

func NewStatusBackend

func NewStatusBackend() *StatusBackend

NewStatusBackend create a new NewStatusBackend instance

func (*StatusBackend) AccountManager

func (b *StatusBackend) AccountManager() *account.Manager

AccountManager returns reference to account manager

func (*StatusBackend) AppStateChange

func (b *StatusBackend) AppStateChange(state string)

AppStateChange handles app state changes (background/foreground). state values: see https://facebook.github.io/react-native/docs/appstate.html

func (*StatusBackend) ApproveSignRequest

func (b *StatusBackend) ApproveSignRequest(id, password string) sign.Result

ApproveSignRequest instructs backend to complete sending of a given transaction.

func (*StatusBackend) ApproveSignRequestWithArgs

func (b *StatusBackend) ApproveSignRequestWithArgs(id, password string, gas, gasPrice int64) sign.Result

ApproveSignRequestWithArgs instructs backend to complete sending of a given transaction. gas and gasPrice will be overrided with the given values before signing the transaction.

func (*StatusBackend) ApproveSignRequests

func (b *StatusBackend) ApproveSignRequests(ids []string, password string) map[string]sign.Result

ApproveSignRequests instructs backend to complete sending of multiple transactions

func (*StatusBackend) CallPrivateRPC

func (b *StatusBackend) CallPrivateRPC(inputJSON string) string

CallPrivateRPC executes public and private RPC requests on node's in-proc RPC server.

func (*StatusBackend) CallRPC

func (b *StatusBackend) CallRPC(inputJSON string) string

CallRPC executes public RPC requests on node's in-proc RPC server.

func (*StatusBackend) ConnectionChange

func (b *StatusBackend) ConnectionChange(typ string, expensive bool)

ConnectionChange handles network state changes logic.

func (*StatusBackend) DiscardSignRequest

func (b *StatusBackend) DiscardSignRequest(id string) error

DiscardSignRequest discards a given transaction from transaction queue

func (*StatusBackend) DiscardSignRequests

func (b *StatusBackend) DiscardSignRequests(ids []string) map[string]error

DiscardSignRequests discards given multiple transactions from transaction queue

func (*StatusBackend) IsNodeRunning

func (b *StatusBackend) IsNodeRunning() bool

IsNodeRunning confirm that node is running

func (*StatusBackend) Logout

func (b *StatusBackend) Logout() error

Logout clears whisper identities.

func (*StatusBackend) NotifyUsers

func (b *StatusBackend) NotifyUsers(message string, payload fcmlib.NotificationPayload, tokens ...string) error

NotifyUsers sends push notifications to users.

func (*StatusBackend) PendingSignRequests

func (b *StatusBackend) PendingSignRequests() *sign.PendingRequests

PendingSignRequests returns reference to a list of current sign requests

func (*StatusBackend) ResetChainData

func (b *StatusBackend) ResetChainData() error

ResetChainData remove chain data from data directory. Node is stopped, and new node is started, with clean data directory.

func (*StatusBackend) RestartNode

func (b *StatusBackend) RestartNode() error

RestartNode restart running Status node, fails if node is not running

func (*StatusBackend) SelectAccount

func (b *StatusBackend) SelectAccount(address, password string) error

SelectAccount selects current account, by verifying that address has corresponding account which can be decrypted using provided password. Once verification is done, decrypted key is injected into Whisper (as a single identity, all previous identities are removed).

func (*StatusBackend) SendTransaction

func (b *StatusBackend) SendTransaction(ctx context.Context, args transactions.SendTxArgs) (hash gethcommon.Hash, err error)

SendTransaction creates a new transaction and waits until it's complete.

func (*StatusBackend) StartNode

func (b *StatusBackend) StartNode(config *params.NodeConfig) error

StartNode start Status node, fails if node is already started

func (*StatusBackend) StatusNode

func (b *StatusBackend) StatusNode() *node.StatusNode

StatusNode returns reference to node manager

func (*StatusBackend) StopNode

func (b *StatusBackend) StopNode() error

StopNode stop Status node. Stopped node cannot be resumed.

func (*StatusBackend) Transactor

func (b *StatusBackend) Transactor() *transactions.Transactor

Transactor returns reference to a status transactor

Jump to

Keyboard shortcuts

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