feat: convert to a regular account method added

This commit is contained in:
Sale Djenic 2023-01-25 11:27:30 +01:00
parent 1d8c32e855
commit 64258e9e0c
2 changed files with 10 additions and 3 deletions

View File

@ -202,8 +202,13 @@ proc loginWithKeycard*(accountData: string, password: string, keyHex: string): s
defer: go_shim.free(funcOut)
return $funcOut
proc convertToKeycardAccount*(keyStoreDir: string, accountData: string, settingsJSON: string, password: string, newPassword: string): string =
var funcOut = go_shim.convertToKeycardAccount(keyStoreDir.cstring, accountData.cstring, settingsJSON.cstring, password.cstring, newPassword.cstring)
proc convertToKeycardAccount*(accountData: string, settingsJSON: string, password: string, newPassword: string): string =
var funcOut = go_shim.convertToKeycardAccount(accountData.cstring, settingsJSON.cstring, password.cstring, newPassword.cstring)
defer: go_shim.free(funcOut)
return $funcOut
proc convertToRegularAccount*(mnemonic: string, currPassword: string, newPassword: string): string =
var funcOut = go_shim.convertToRegularAccount(mnemonic.cstring, currPassword.cstring, newPassword.cstring)
defer: go_shim.free(funcOut)
return $funcOut

View File

@ -81,7 +81,9 @@ proc validateNodeConfig*(configJSON: cstring): cstring {.importc: "ValidateNodeC
proc loginWithKeycard*(accountData: cstring, password: cstring, keyHex: cstring): cstring {.importc: "LoginWithKeycard".}
func convertToKeycardAccount*(keyStoreDir: cstring, accountData: cstring, settingsJSON: cstring, password: cstring, newPassword: cstring): cstring {.importc: "ConvertToKeycardAccount".}
func convertToKeycardAccount*(accountData: cstring, settingsJSON: cstring, password: cstring, newPassword: cstring): cstring {.importc: "ConvertToKeycardAccount".}
func convertToRegularAccount*(mnemonic: cstring, currPassword: cstring, newPassword: cstring): cstring {.importc: "ConvertToRegularAccount".}
proc recover*(rpcParams: cstring): cstring {.importc: "Recover".}