api

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: MPL-2.0 Imports: 21 Imported by: 0

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")
	// ErrUnsupportedRPCMethod is for methods not supported by the RPC interface
	ErrUnsupportedRPCMethod = errors.New("method is unsupported by RPC interface")
)

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) 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) CreateContactCode added in v0.15.1

func (b *StatusBackend) CreateContactCode() (string, error)

CreateContactCode create or return the latest contact code

func (*StatusBackend) ExtractGroupMembershipSignatures added in v0.16.3

func (b *StatusBackend) ExtractGroupMembershipSignatures(signaturePairs [][2]string) ([]string, error)

ExtractGroupMembershipSignatures extract signatures from tuples of content/signature

func (*StatusBackend) ExtractIdentityFromContactCode added in v0.15.1

func (b *StatusBackend) ExtractIdentityFromContactCode(contactCode string) (string, error)

ExtractIdentityFromContactCode extract the identity of the user generating the contact code

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) ProcessContactCode added in v0.15.1

func (b *StatusBackend) ProcessContactCode(contactCode string) error

ProcessContactCode process and adds the someone else's bundle

func (*StatusBackend) Recover added in v0.11.0

func (b *StatusBackend) Recover(rpcParams personal.RecoverParams) (gethcommon.Address, error)

Recover calls the personalAPI to return address associated with the private key that was used to calculate the signature in the message

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(sendArgs transactions.SendTxArgs, password string) (hash gethcommon.Hash, err error)

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

func (*StatusBackend) SignGroupMembership added in v0.15.1

func (b *StatusBackend) SignGroupMembership(content string) (string, error)

SignGroupMembership signs a piece of data containing membership information

func (*StatusBackend) SignMessage added in v0.11.0

func (b *StatusBackend) SignMessage(rpcParams personal.SignParams) (hexutil.Bytes, error)

SignMessage checks the pwd vs the selected account and passes on the signParams to personalAPI for message signature

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

func (*StatusBackend) VerifyGroupMembershipSignatures added in v0.15.1

func (b *StatusBackend) VerifyGroupMembershipSignatures(signaturePairs [][3]string) error

DEPRECATED VerifyGroupMembershipSignatures verifies that the signatures are valid

Jump to

Keyboard shortcuts

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