2021-03-15 15:16:34 +00:00
|
|
|
type SignalCallback* = proc(signal: cstring): void {.cdecl.}
|
|
|
|
|
|
|
|
# All procs start with lowercase because the compiler will also need to import
|
|
|
|
# status-go, and it will complain of duplication of function names
|
|
|
|
|
|
|
|
proc hashMessage*(message: cstring): cstring {.importc: "HashMessage".}
|
|
|
|
|
|
|
|
proc initKeystore*(keydir: cstring): cstring {.importc: "InitKeystore".}
|
|
|
|
|
|
|
|
proc openAccounts*(datadir: cstring): cstring {.importc: "OpenAccounts".}
|
|
|
|
|
|
|
|
proc multiAccountGenerateAndDeriveAddresses*(paramsJSON: cstring): cstring {.importc: "MultiAccountGenerateAndDeriveAddresses".}
|
|
|
|
|
|
|
|
proc multiAccountStoreDerivedAccounts*(paramsJSON: cstring): cstring {.importc: "MultiAccountStoreDerivedAccounts".}
|
|
|
|
|
|
|
|
proc multiAccountImportMnemonic*(paramsJSON: cstring): cstring {.importc: "MultiAccountImportMnemonic".}
|
|
|
|
|
2022-10-27 18:36:41 +00:00
|
|
|
proc createAccountFromMnemonicAndDeriveAccountsForPaths*(paramsJSON: cstring): cstring {.importc: "CreateAccountFromMnemonicAndDeriveAccountsForPaths".}
|
2022-08-23 18:21:31 +00:00
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc multiAccountImportPrivateKey*(paramsJSON: cstring): cstring {.importc: "MultiAccountImportPrivateKey".}
|
|
|
|
|
|
|
|
proc multiAccountDeriveAddresses*(paramsJSON: cstring): cstring {.importc: "MultiAccountDeriveAddresses".}
|
|
|
|
|
|
|
|
proc saveAccountAndLogin*(accountData: cstring, password: cstring, settingsJSON: cstring, configJSON: cstring, subaccountData: cstring): cstring {.importc: "SaveAccountAndLogin".}
|
|
|
|
|
|
|
|
proc deleteMultiAccount*(keyUID: cstring, keyStoreDir: cstring): cstring {.importc: "DeleteMultiaccount".}
|
|
|
|
|
|
|
|
proc callRPC*(inputJSON: cstring): cstring {.importc: "CallRPC".}
|
|
|
|
|
|
|
|
proc callPrivateRPC*(inputJSON: cstring): cstring {.importc: "CallPrivateRPC".}
|
|
|
|
|
|
|
|
proc addPeer*(peer: cstring): cstring {.importc: "AddPeer".}
|
|
|
|
|
|
|
|
proc setSignalEventCallback*(callback: SignalCallback) {.importc: "SetSignalEventCallback".}
|
|
|
|
|
|
|
|
proc sendTransaction*(jsonArgs: cstring, password: cstring): cstring {.importc: "SendTransaction".}
|
|
|
|
|
2022-05-23 10:48:16 +00:00
|
|
|
proc sendTransactionWithChainId*(chainId: cint, jsonArgs: cstring, password: cstring): cstring {.importc: "SendTransactionWithChainID".}
|
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc generateAlias*(pk: cstring): cstring {.importc: "GenerateAlias".}
|
|
|
|
|
2022-03-14 18:35:23 +00:00
|
|
|
proc isAlias*(value: cstring): cstring {.importc: "IsAlias".}
|
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc identicon*(pk: cstring): cstring {.importc: "Identicon".}
|
|
|
|
|
2022-03-17 19:52:43 +00:00
|
|
|
proc emojiHash*(pk: cstring): cstring {.importc: "EmojiHash".}
|
|
|
|
|
|
|
|
proc colorHash*(pk: cstring): cstring {.importc: "ColorHash".}
|
|
|
|
|
2022-04-07 19:28:46 +00:00
|
|
|
proc colorID*(pk: cstring): cstring {.importc: "ColorID".}
|
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc login*(accountData: cstring, password: cstring): cstring {.importc: "Login".}
|
|
|
|
|
2021-12-21 14:28:08 +00:00
|
|
|
proc loginWithConfig*(accountData: cstring, password: cstring, configJSON: cstring): cstring {.importc: "LoginWithConfig".}
|
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc logout*(): cstring {.importc: "Logout".}
|
|
|
|
|
|
|
|
proc verifyAccountPassword*(keyStoreDir: cstring, address: cstring, password: cstring): cstring {.importc: "VerifyAccountPassword".}
|
|
|
|
|
2023-02-11 11:14:56 +00:00
|
|
|
proc verifyDatabasePassword*(keyUID: cstring, password: cstring): cstring {.importc: "VerifyDatabasePassword".}
|
|
|
|
|
2021-08-11 09:42:26 +00:00
|
|
|
proc changeDatabasePassword*(keyUID: cstring, password: cstring, newPassword: cstring): cstring {.importc: "ChangeDatabasePassword".}
|
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc validateMnemonic*(mnemonic: cstring): cstring {.importc: "ValidateMnemonic".}
|
|
|
|
|
|
|
|
proc saveAccountAndLoginWithKeycard*(accountData: cstring, password: cstring, settingsJSON: cstring, configJSON: cstring, subaccountData: cstring, keyHex: cstring): cstring {.importc: "SaveAccountAndLoginWithKeycard".}
|
|
|
|
|
|
|
|
proc hashTransaction*(txArgsJSON: cstring): cstring {.importc: "HashTransaction".}
|
|
|
|
|
|
|
|
proc extractGroupMembershipSignatures*(signaturePairsStr: cstring): cstring {.importc: "ExtractGroupMembershipSignatures".}
|
|
|
|
|
|
|
|
proc connectionChange*(typ: cstring, expensive: cstring) {.importc: "ConnectionChange".}
|
|
|
|
|
|
|
|
proc multiformatSerializePublicKey*(key: cstring, outBase: cstring): cstring {.importc: "MultiformatSerializePublicKey".}
|
|
|
|
|
|
|
|
proc multiformatDeserializePublicKey*(key: cstring, outBase: cstring): cstring {.importc: "MultiformatDeserializePublicKey".}
|
|
|
|
|
2022-10-26 10:53:07 +00:00
|
|
|
proc decompressPublicKey*(key: cstring): cstring {.importc: "DecompressPublicKey".}
|
|
|
|
|
|
|
|
proc compressPublicKey*(key: cstring): cstring {.importc: "CompressPublicKey".}
|
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc validateNodeConfig*(configJSON: cstring): cstring {.importc: "ValidateNodeConfig".}
|
|
|
|
|
|
|
|
proc loginWithKeycard*(accountData: cstring, password: cstring, keyHex: cstring): cstring {.importc: "LoginWithKeycard".}
|
|
|
|
|
2023-01-25 10:27:30 +00:00
|
|
|
func convertToKeycardAccount*(accountData: cstring, settingsJSON: cstring, password: cstring, newPassword: cstring): cstring {.importc: "ConvertToKeycardAccount".}
|
|
|
|
|
|
|
|
func convertToRegularAccount*(mnemonic: cstring, currPassword: cstring, newPassword: cstring): cstring {.importc: "ConvertToRegularAccount".}
|
2022-07-27 08:41:23 +00:00
|
|
|
|
2021-03-15 15:16:34 +00:00
|
|
|
proc recover*(rpcParams: cstring): cstring {.importc: "Recover".}
|
|
|
|
|
|
|
|
proc writeHeapProfile*(dataDir: cstring): cstring {.importc: "WriteHeapProfile".}
|
|
|
|
|
|
|
|
proc hashTypedData*(data: cstring): cstring {.importc: "HashTypedData".}
|
|
|
|
|
|
|
|
proc resetChainData*(): cstring {.importc: "ResetChainData".}
|
|
|
|
|
|
|
|
proc signMessage*(rpcParams: cstring): cstring {.importc: "SignMessage".}
|
|
|
|
|
|
|
|
proc signTypedData*(data: cstring, address: cstring, password: cstring): cstring {.importc: "SignTypedData".}
|
|
|
|
|
|
|
|
proc stopCPUProfiling*(): cstring {.importc: "StopCPUProfiling".}
|
|
|
|
|
|
|
|
proc getNodesFromContract*(rpcEndpoint: cstring, contractAddress: cstring): cstring {.importc: "GetNodesFromContract".}
|
|
|
|
|
|
|
|
proc exportNodeLogs*(): cstring {.importc: "ExportNodeLogs".}
|
|
|
|
|
|
|
|
proc chaosModeUpdate*(on: cint): cstring {.importc: "ChaosModeUpdate".}
|
|
|
|
|
|
|
|
proc signHash*(hexEncodedHash: cstring): cstring {.importc: "SignHash".}
|
|
|
|
|
|
|
|
proc sendTransactionWithSignature*(txtArgsJSON: cstring, sigString: cstring): cstring {.importc: "SendTransactionWithSignature".}
|
|
|
|
|
|
|
|
proc startCPUProfile*(dataDir: cstring): cstring {.importc: "StartCPUProfile".}
|
|
|
|
|
|
|
|
proc appStateChange*(state: cstring) {.importc: "AppStateChange".}
|
|
|
|
|
|
|
|
proc signGroupMembership*(content: cstring): cstring {.importc: "SignGroupMembership".}
|
|
|
|
|
|
|
|
proc multiAccountStoreAccount*(paramsJSON: cstring): cstring {.importc: "MultiAccountStoreAccount".}
|
|
|
|
|
|
|
|
proc multiAccountLoadAccount*(paramsJSON: cstring): cstring {.importc: "MultiAccountLoadAccount".}
|
|
|
|
|
|
|
|
proc multiAccountGenerate*(paramsJSON: cstring): cstring {.importc: "MultiAccountGenerate".}
|
|
|
|
|
|
|
|
proc multiAccountReset*(): cstring {.importc: "MultiAccountReset".}
|
|
|
|
|
|
|
|
proc migrateKeyStoreDir*(accountData: cstring, password: cstring, oldKeystoreDir: cstring, multiaccountKeystoreDir: cstring): cstring {.importc: "MigrateKeyStoreDir".}
|
|
|
|
|
|
|
|
proc startWallet*(watchNewBlocks: bool): cstring {.importc: "StartWallet".}
|
|
|
|
|
|
|
|
proc stopWallet*(): cstring {.importc: "StopWallet".}
|
|
|
|
|
|
|
|
proc startLocalNotifications*(): cstring {.importc: "StartLocalNotifications".}
|
|
|
|
|
|
|
|
proc stopLocalNotifications*(): cstring {.importc: "StopLocalNotifications".}
|
2021-06-04 17:36:05 +00:00
|
|
|
|
|
|
|
proc getNodeConfig*(): cstring {.importc: "GetNodeConfig".}
|
2021-08-31 14:05:59 +00:00
|
|
|
|
|
|
|
proc free*(param: pointer) {.importc: "Free".}
|
2022-02-21 20:58:28 +00:00
|
|
|
|
|
|
|
proc imageServerTLSCert*(): cstring {.importc: "ImageServerTLSCert".}
|
2022-03-16 20:02:33 +00:00
|
|
|
|
2022-03-22 09:10:50 +00:00
|
|
|
proc getPasswordStrength*(paramsJSON: cstring): cstring {.importc: "GetPasswordStrength".}
|
|
|
|
|
2022-03-30 01:59:17 +00:00
|
|
|
proc getPasswordStrengthScore*(paramsJSON: cstring): cstring {.importc: "GetPasswordStrengthScore".}
|
|
|
|
|
|
|
|
proc switchFleet*(newFleet: cstring, configJSON: cstring): cstring{.importc: "SwitchFleet".}
|
2022-04-06 11:11:02 +00:00
|
|
|
|
2023-02-20 00:09:23 +00:00
|
|
|
proc generateImages*(imagePath: cstring, aX: cint, aY: cint, bX: cint, bY: cint): cstring {.importc: "GenerateImages".}
|
|
|
|
|
|
|
|
proc getConnectionStringForBeingBootstrapped*(configJSON: cstring) : cstring {.importc: "GetConnectionStringForBeingBootstrapped".}
|
|
|
|
|
|
|
|
proc getConnectionStringForBootstrappingAnotherDevice*(configJSON: cstring) : cstring {.importc: "GetConnectionStringForBootstrappingAnotherDevice".}
|
|
|
|
|
|
|
|
proc inputConnectionStringForBootstrapping*(connectionString: cstring, configJSON: cstring) : cstring {.importc: "InputConnectionStringForBootstrapping".}
|
|
|
|
|
|
|
|
proc validateConnectionString*(connectionString: cstring) : cstring {.importc: "ValidateConnectionString".}
|