status-desktop/libstatus.h

294 lines
8.0 KiB
C
Raw Normal View History

2020-05-06 17:40:00 +00:00
/* Code generated by cmd/cgo; DO NOT EDIT. */
/* package github.com/status-im/status-go/lib */
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h> /* for ptrdiff_t below */
#ifndef GO_CGO_EXPORT_PROLOGUE_H
#define GO_CGO_EXPORT_PROLOGUE_H
#ifndef GO_CGO_GOSTRING_TYPEDEF
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
#endif
#endif
/* Start of preamble from import "C" comments. */
#line 3 "library.go"
#include <stdlib.h>
#line 1 "cgo-generated-wrapper"
#line 3 "multiaccount.go"
#include <stdlib.h>
#line 1 "cgo-generated-wrapper"
/* End of preamble from import "C" comments. */
/* Start of boilerplate cgo prologue. */
#line 1 "cgo-gcc-export-header-prolog"
#ifndef GO_CGO_PROLOGUE_H
#define GO_CGO_PROLOGUE_H
typedef signed char GoInt8;
typedef unsigned char GoUint8;
typedef short GoInt16;
typedef unsigned short GoUint16;
typedef int GoInt32;
typedef unsigned int GoUint32;
typedef long long GoInt64;
typedef unsigned long long GoUint64;
typedef GoInt64 GoInt;
typedef GoUint64 GoUint;
typedef __SIZE_TYPE__ GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
/*
static assertion to make sure the file is being used on architecture
at least with matching size of GoInt.
*/
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
#ifndef GO_CGO_GOSTRING_TYPEDEF
typedef _GoString_ GoString;
#endif
typedef void *GoMap;
typedef void *GoChan;
typedef struct { void *t; void *v; } GoInterface;
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
#endif
/* End of boilerplate cgo prologue. */
#ifdef __cplusplus
extern "C" {
#endif
// OpenAccounts opens database and returns accounts list.
extern char* OpenAccounts(char* p0);
// ExtractGroupMembershipSignatures extract public keys from tuples of content/signature
extern char* ExtractGroupMembershipSignatures(char* p0);
// Sign signs a string containing group membership information
extern char* SignGroupMembership(char* p0);
//ValidateNodeConfig validates config for status node
extern char* ValidateNodeConfig(char* p0);
//ResetChainData remove chain data from data directory
extern char* ResetChainData();
//CallRPC calls public APIs via RPC
extern char* CallRPC(char* p0);
//CallPrivateRPC calls both public and private APIs via RPC
extern char* CallPrivateRPC(char* p0);
//CreateAccount is equivalent to creating an account from the command line,
// just modified to handle the function arg passing
extern char* CreateAccount(char* p0);
//RecoverAccount re-creates master key using given details
extern char* RecoverAccount(char* p0, char* p1);
// StartOnboarding initialize the onboarding with n random accounts
extern char* StartOnboarding(int p0, int p1);
// ImportOnboardingAccount re-creates and imports an account created during onboarding.
extern char* ImportOnboardingAccount(char* p0, char* p1);
// RemoveOnboarding resets the current onboarding removing from memory all the generated keys.
extern void RemoveOnboarding();
//VerifyAccountPassword verifies account password
extern char* VerifyAccountPassword(char* p0, char* p1, char* p2);
//StartNode - start Status node
extern char* StartNode(char* p0);
//StopNode - stop status node
extern char* StopNode();
//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
extern char* Login(char* p0, char* p1);
// SaveAccountAndLogin saves account in status-go database..
extern char* SaveAccountAndLogin(char* p0, char* p1, char* p2, char* p3, char* p4);
// InitKeystore initialize keystore before doing any operations with keys.
extern char* InitKeystore(char* p0);
// 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.
extern char* LoginWithKeycard(char* p0, char* p1);
//Logout is equivalent to clearing whisper identities
extern char* Logout();
// SignMessage unmarshals rpc params {data, address, password} and passes
// them onto backend.SignMessage
extern char* SignMessage(char* p0);
// Recover unmarshals rpc params {signDataString, signedData} and passes
// them onto backend.
extern char* Recover(char* p0);
// SendTransaction converts RPC args and calls backend.SendTransaction
extern char* SendTransaction(char* p0, char* p1);
// SendTransactionWithSignature converts RPC args and calls backend.SendTransactionWithSignature
extern char* SendTransactionWithSignature(char* p0, char* p1);
// HashTransaction validate the transaction and returns new txArgs and the transaction hash.
extern char* HashTransaction(char* p0);
// 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.
extern char* HashMessage(char* p0);
// SignTypedData unmarshall data into TypedData, validate it and signs with selected account,
// if password matches selected account.
extern char* SignTypedData(char* p0, char* p1, char* p2);
// HashTypedData unmarshalls data into TypedData, validates it and hashes it.
extern char* HashTypedData(char* p0);
//StartCPUProfile runs pprof for cpu
extern char* StartCPUProfile(char* p0);
//StopCPUProfiling stops pprof for cpu
extern char* StopCPUProfiling();
//WriteHeapProfile starts pprof for heap
extern char* WriteHeapProfile(char* p0);
// AddPeer adds an enode as a peer.
extern char* AddPeer(char* p0);
// ConnectionChange handles network state changes as reported
// by ReactNative (see https://facebook.github.io/react-native/docs/netinfo.html)
extern void ConnectionChange(char* p0, int p1);
// AppStateChange handles app state changes (background/foreground).
extern void AppStateChange(char* p0);
// SetSignalEventCallback setup geth callback to notify about new signal
extern void SetSignalEventCallback(void* p0);
// ExportNodeLogs reads current node log and returns content to a caller.
extern char* ExportNodeLogs();
// ChaosModeUpdate changes the URL of the upstream RPC client.
extern char* ChaosModeUpdate(int p0);
// GetNodesFromContract returns a list of nodes from a contract
extern char* GetNodesFromContract(char* p0, char* p1);
// SignHash exposes vanilla ECDSA signing required for Swarm messages
extern char* SignHash(char* p0);
// GenerateAlias returns a 3 random name words given the pk string 0x prefixed
extern char* GenerateAlias(GoString p0);
// Identicon returns the base64 identicon
extern char* Identicon(GoString p0);
// MultiAccountGenerate generates account in memory without storing them.
extern char* MultiAccountGenerate(char* p0);
// MultiAccountGenerateAndDeriveAddresses combines Generate and DeriveAddresses in one call.
extern char* MultiAccountGenerateAndDeriveAddresses(char* p0);
// MultiAccountDeriveAddresses derive addresses from an account selected by ID, without storing them.
extern char* MultiAccountDeriveAddresses(char* p0);
// MultiAccountStoreDerivedAccounts derive accounts from the specified key and store them encrypted with the specified password.
extern char* MultiAccountStoreDerivedAccounts(char* p0);
// MultiAccountImportPrivateKey imports a raw private key without storing it.
extern char* MultiAccountImportPrivateKey(char* p0);
// MultiAccountImportMnemonic imports an account derived from the mnemonic phrase and the Bip39Passphrase storing it.
extern char* MultiAccountImportMnemonic(char* p0);
// MultiAccountStoreAccount stores the select account.
extern char* MultiAccountStoreAccount(char* p0);
// MultiAccountLoadAccount loads in memory the account specified by address unlocking it with password.
extern char* MultiAccountLoadAccount(char* p0);
// MultiAccountReset remove all the multi-account keys from memory.
extern char* MultiAccountReset();
#ifdef __cplusplus
}
#endif