feat: Expose compress and decompress pubkey functions

Issue #8001
This commit is contained in:
Michal Iskierko 2022-10-26 12:53:07 +02:00 committed by Michał Iskierko
parent 7be103a29b
commit 1d8c32e855
2 changed files with 14 additions and 0 deletions

View File

@ -182,6 +182,16 @@ proc multiformatDeserializePublicKey*(key: string, outBase: string): string =
defer: go_shim.free(funcOut)
return $funcOut
proc decompressPublicKey*(key: string): string =
var funcOut = go_shim.decompressPublicKey(key.cstring)
defer: go_shim.free(funcOut)
return $funcOut
proc compressPublicKey*(key: string): string =
var funcOut = go_shim.compressPublicKey(key.cstring)
defer: go_shim.free(funcOut)
return $funcOut
proc validateNodeConfig*(configJSON: string): string =
var funcOut = go_shim.validateNodeConfig(configJSON.cstring)
defer: go_shim.free(funcOut)

View File

@ -73,6 +73,10 @@ proc multiformatSerializePublicKey*(key: cstring, outBase: cstring): cstring {.i
proc multiformatDeserializePublicKey*(key: cstring, outBase: cstring): cstring {.importc: "MultiformatDeserializePublicKey".}
proc decompressPublicKey*(key: cstring): cstring {.importc: "DecompressPublicKey".}
proc compressPublicKey*(key: cstring): cstring {.importc: "CompressPublicKey".}
proc validateNodeConfig*(configJSON: cstring): cstring {.importc: "ValidateNodeConfig".}
proc loginWithKeycard*(accountData: cstring, password: cstring, keyHex: cstring): cstring {.importc: "LoginWithKeycard".}