Documentation
¶
Index ¶
- func AddPeer(enode string) string
- func AppStateChange(state string)
- func CallPrivateRPC(inputJSON string) string
- func CallRPC(inputJSON string) string
- func ChangeDatabasePassword(keyUID, password, newPassword string) string
- func ConnectionChange(typ string, expensive int)
- func ConvertToKeycardAccount(keyStoreDir, accountData, settingsJSON, password, newPassword string) string
- func DeleteImportedKey(address, password, keyStoreDir string) string
- func DeleteMultiaccount(keyUID, keyStoreDir string) string
- func ExportNodeLogs() string
- func ExportUnencryptedDatabase(accountData, password, databasePath string) string
- func ExtractGroupMembershipSignatures(signaturePairsStr string) string
- func GenerateAlias(pk string) string
- func GetNodeConfig() string
- func HashMessage(message string) string
- func HashTransaction(txArgsJSON string) string
- func HashTypedData(data string) string
- func HashTypedDataV4(data string) string
- func Identicon(pk string) string
- func ImportUnencryptedDatabase(accountData, password, databasePath string) string
- func InitKeystore(keydir string) string
- func Login(accountData, password string) string
- func LoginWithKeycard(accountData, password, keyHex string) string
- func Logout() string
- func MigrateKeyStoreDir(accountData, password, oldDir, newDir string) string
- func MultiAccountDeriveAddresses(paramsJSON string) string
- func MultiAccountGenerate(paramsJSON string) string
- func MultiAccountGenerateAndDeriveAddresses(paramsJSON string) string
- func MultiAccountImportMnemonic(paramsJSON string) string
- func MultiAccountImportPrivateKey(paramsJSON string) string
- func MultiAccountLoadAccount(paramsJSON string) string
- func MultiAccountReset() string
- func MultiAccountStoreAccount(paramsJSON string) string
- func MultiAccountStoreDerivedAccounts(paramsJSON string) string
- func MultiformatDeserializePublicKey(key, outBase string) string
- func MultiformatSerializePublicKey(key, outBase string) string
- func OpenAccounts(datadir string) string
- func Recover(rpcParams string) string
- func ResetChainData() string
- func SaveAccountAndLogin(accountData, password, settingsJSON, configJSON, subaccountData string) string
- func SaveAccountAndLoginWithKeycard(accountData, password, settingsJSON, configJSON, subaccountData string, ...) string
- func SendTransaction(txArgsJSON, password string) string
- func SendTransactionWithSignature(txArgsJSON, sigString string) string
- func SetMobileSignalHandler(handler SignalHandler)
- func SetSignalEventCallback(cb unsafe.Pointer)
- func SignGroupMembership(content string) string
- func SignHash(hexEncodedHash string) string
- func SignMessage(rpcParams string) string
- func SignTypedData(data, address, password string) string
- func SignTypedDataV4(data, address, password string) string
- func StartCPUProfile(dataDir string) string
- func StartLocalNotifications() string
- func StopCPUProfiling() string
- func StopLocalNotifications() string
- func ValidateMnemonic(mnemonic string) string
- func ValidateNodeConfig(configJSON string) string
- func VerifyAccountPassword(keyStoreDir, address, password string) string
- func VerifyDatabasePassword(keyUID, password string) string
- func WriteHeapProfile(dataDir string) string
- type APIDetailedResponse
- type APIError
- type APIFieldError
- type APIResponse
- type AccountInfo
- type MultiAccountDeriveAddressesParams
- type MultiAccountGenerateAndDeriveAddressesParams
- type MultiAccountGenerateParams
- type MultiAccountImportMnemonicParams
- type MultiAccountImportPrivateKeyParams
- type MultiAccountLoadAccountParams
- type MultiAccountStoreAccountParams
- type MultiAccountStoreDerivedAccountsParams
- type NotifyResult
- type OnboardingAccount
- type SignalHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppStateChange ¶
func AppStateChange(state string)
AppStateChange handles app state changes (background/foreground).
func CallPrivateRPC ¶
CallPrivateRPC calls both public and private APIs via RPC.
func ChangeDatabasePassword ¶ added in v0.80.2
func ConnectionChange ¶
ConnectionChange handles network state changes as reported by ReactNative (see https://facebook.github.io/react-native/docs/netinfo.html)
func ConvertToKeycardAccount ¶ added in v0.83.0
func DeleteImportedKey ¶ added in v0.83.12
DeleteImportedKey
func DeleteMultiaccount ¶ added in v0.55.2
DeleteMultiaccount
func ExportNodeLogs ¶
func ExportNodeLogs() string
ExportNodeLogs reads current node log and returns content to a caller.
func ExportUnencryptedDatabase ¶ added in v0.69.0
ExportUnencryptedDatabase exports the database unencrypted to the given path
func ExtractGroupMembershipSignatures ¶
ExtractGroupMembershipSignatures extract public keys from tuples of content/signature.
func GenerateAlias ¶
func GetNodeConfig ¶ added in v0.77.1
func GetNodeConfig() string
GetNodeConfig returns the current config of the Status node
func HashMessage ¶
HashMessage calculates the hash of a message to be safely signed by the keycard The hash is calulcated as
keccak256("\x19Ethereum Signed Message:\n"${message length}${message}).
This gives context to the signed message and prevents signing of transactions.
func HashTransaction ¶
HashTransaction validate the transaction and returns new txArgs and the transaction hash.
func HashTypedData ¶
HashTypedData unmarshalls data into TypedData, validates it and hashes it.
func HashTypedDataV4 ¶ added in v0.76.4
HashTypedDataV4 unmarshalls data into TypedData, validates it and hashes it.
func ImportUnencryptedDatabase ¶ added in v0.69.0
ImportUnencryptedDatabase imports the database unencrypted to the given directory
func InitKeystore ¶
InitKeystore initialize keystore before doing any operations with keys.
func Login ¶
Login loads a key file (for a given address), tries to decrypt it using the password, to verify ownership if verified, purges all the previous identities from Whisper, and injects verified key as shh identity.
func LoginWithKeycard ¶
LoginWithKeycard initializes an account with a chat key and encryption key used for PFS. It purges all the previous identities from Whisper, and injects the key as shh identity.
func MigrateKeyStoreDir ¶ added in v0.55.1
MigrateKeyStoreDir migrates key files to a new directory
func MultiAccountDeriveAddresses ¶
MultiAccountDeriveAddresses derive addresses from an account selected by ID, without storing them.
func MultiAccountGenerate ¶
MultiAccountGenerate generates account in memory without storing them.
func MultiAccountGenerateAndDeriveAddresses ¶
MultiAccountGenerateAndDeriveAddresses combines Generate and DeriveAddresses in one call.
func MultiAccountImportMnemonic ¶
MultiAccountImportMnemonic imports an account derived from the mnemonic phrase and the Bip39Passphrase storing it.
func MultiAccountImportPrivateKey ¶
MultiAccountImportPrivateKey imports a raw private key without storing it.
func MultiAccountLoadAccount ¶
MultiAccountLoadAccount loads in memory the account specified by address unlocking it with password.
func MultiAccountReset ¶
func MultiAccountReset() string
MultiAccountReset remove all the multi-account keys from memory.
func MultiAccountStoreAccount ¶
MultiAccountStoreAccount stores the select account.
func MultiAccountStoreDerivedAccounts ¶
MultiAccountStoreDerivedAccounts derive accounts from the specified key and store them encrypted with the specified password.
func MultiformatDeserializePublicKey ¶ added in v0.55.1
DeserializePublicKey decompresses a compressed multibase encoded multicodec identified EC public key For details on usage see specs https://specs.status.im/spec/2#public-key-serialization
func MultiformatSerializePublicKey ¶ added in v0.55.1
SerializePublicKey compresses an uncompressed multibase encoded multicodec identified EC public key For details on usage see specs https://specs.status.im/spec/2#public-key-serialization
func OpenAccounts ¶
OpenAccounts opens database and returns accounts list.
func Recover ¶
Recover unmarshals rpc params {signDataString, signedData} and passes them onto backend.
func ResetChainData ¶
func ResetChainData() string
ResetChainData removes chain data from data directory.
func SaveAccountAndLogin ¶
func SaveAccountAndLogin(accountData, password, settingsJSON, configJSON, subaccountData string) string
SaveAccountAndLogin saves account in status-go database..
func SaveAccountAndLoginWithKeycard ¶
func SaveAccountAndLoginWithKeycard(accountData, password, settingsJSON, configJSON, subaccountData string, keyHex string) string
SaveAccountAndLoginWithKeycard saves account in status-go database..
func SendTransaction ¶
SendTransaction converts RPC args and calls backend.SendTransaction.
func SendTransactionWithSignature ¶
SendTransactionWithSignature converts RPC args and calls backend.SendTransactionWithSignature
func SetMobileSignalHandler ¶
func SetMobileSignalHandler(handler SignalHandler)
SetMobileSignalHandler setup geth callback to notify about new signal used for gomobile builds
func SetSignalEventCallback ¶
SetSignalEventCallback setup geth callback to notify about new signal
func SignGroupMembership ¶
SignGroupMembership signs a string containing group membership information.
func SignMessage ¶
SignMessage unmarshals rpc params {data, address, password} and passes them onto backend.SignMessage.
func SignTypedData ¶
SignTypedData unmarshall data into TypedData, validate it and signs with selected account, if password matches selected account.
func SignTypedDataV4 ¶ added in v0.76.4
SignTypedDataV4 unmarshall data into TypedData, validate it and signs with selected account, if password matches selected account.
func StartCPUProfile ¶
StartCPUProfile runs pprof for CPU.
func StartLocalNotifications ¶ added in v0.62.16
func StartLocalNotifications() string
StartLocalNotifications
func StopLocalNotifications ¶ added in v0.62.16
func StopLocalNotifications() string
StopLocalNotifications
func ValidateMnemonic ¶ added in v0.38.1
func ValidateNodeConfig ¶
ValidateNodeConfig validates config for the Status node.
func VerifyAccountPassword ¶
VerifyAccountPassword verifies account password.
func VerifyDatabasePassword ¶ added in v0.83.0
func WriteHeapProfile ¶
WriteHeapProfile starts pprof for heap
Types ¶
type APIDetailedResponse ¶
type APIDetailedResponse struct { Status bool `json:"status"` Message string `json:"message,omitempty"` FieldErrors []APIFieldError `json:"field_errors,omitempty"` }
APIDetailedResponse represents a generic response with possible errors.
func (APIDetailedResponse) Error ¶
func (r APIDetailedResponse) Error() string
Error string representation of APIDetailedResponse.
type APIError ¶
type APIError struct {
Message string `json:"message"`
}
APIError represents a single error.
type APIFieldError ¶
type APIFieldError struct { Parameter string `json:"parameter,omitempty"` Errors []APIError `json:"errors"` }
APIFieldError represents a set of errors related to a parameter.
func (APIFieldError) Error ¶
func (e APIFieldError) Error() string
Error string representation of APIFieldError.
type APIResponse ¶
type APIResponse struct {
Error string `json:"error"`
}
APIResponse generic response from API.
type AccountInfo ¶
type AccountInfo struct { Address string `json:"address"` // DEPRECATED PubKey string `json:"pubkey"` // DEPRECATED WalletAddress string `json:"walletAddress"` WalletPubKey string `json:"walletPubKey"` ChatAddress string `json:"chatAddress"` ChatPubKey string `json:"chatPubKey"` Mnemonic string `json:"mnemonic"` Error string `json:"error"` }
AccountInfo represents account's info.
type MultiAccountDeriveAddressesParams ¶
type MultiAccountDeriveAddressesParams struct { AccountID string `json:"accountID"` Paths []string `json:"paths"` }
MultiAccountDeriveAddressesParams are the params sent to MultiAccountDeriveAddresses.
type MultiAccountGenerateAndDeriveAddressesParams ¶
type MultiAccountGenerateAndDeriveAddressesParams struct { MultiAccountGenerateParams Paths []string `json:"paths"` }
MultiAccountGenerateAndDeriveAddressesParams are the params sent to MultiAccountGenerateAndDeriveAddresses.
type MultiAccountGenerateParams ¶
type MultiAccountGenerateParams struct { N int `json:"n"` MnemonicPhraseLength int `json:"mnemonicPhraseLength"` Bip39Passphrase string `json:"bip39Passphrase"` }
MultiAccountGenerateParams are the params sent to MultiAccountGenerate.
type MultiAccountImportMnemonicParams ¶
type MultiAccountImportMnemonicParams struct { MnemonicPhrase string `json:"mnemonicPhrase"` Bip39Passphrase string `json:"Bip39Passphrase"` }
MultiAccountImportMnemonicParams are the params sent to MultiAccountImportMnemonic.
type MultiAccountImportPrivateKeyParams ¶
type MultiAccountImportPrivateKeyParams struct {
PrivateKey string `json:"privateKey"`
}
MultiAccountImportPrivateKeyParams are the params sent to MultiAccountImportPrivateKey.
type MultiAccountLoadAccountParams ¶
type MultiAccountLoadAccountParams struct { Address string `json:"address"` Password string `json:"password"` }
MultiAccountLoadAccountParams are the params sent to MultiAccountLoadAccount.
type MultiAccountStoreAccountParams ¶
type MultiAccountStoreAccountParams struct { AccountID string `json:"accountID"` Password string `json:"password"` }
MultiAccountStoreAccountParams are the params sent to MultiAccountStoreAccount.
type MultiAccountStoreDerivedAccountsParams ¶
type MultiAccountStoreDerivedAccountsParams struct { MultiAccountDeriveAddressesParams Password string `json:"password"` }
MultiAccountStoreDerivedAccountsParams are the params sent to MultiAccountStoreDerivedAccounts.
type NotifyResult ¶
NotifyResult is a JSON returned from notify message.
type OnboardingAccount ¶
type OnboardingAccount struct { ID string `json:"id"` Address string `json:"address"` // DEPRECATED PubKey string `json:"pubkey"` // DEPRECATED WalletAddress string `json:"walletAddress"` WalletPubKey string `json:"walletPubKey"` ChatAddress string `json:"chatAddress"` ChatPubKey string `json:"chatPubKey"` }
OnboardingAccount represents accounts info generated for the onboarding.
type SignalHandler ¶
type SignalHandler interface {
HandleSignal(string)
}
SignalHandler defines a minimal interface a signal handler needs to implement.