From 73fe79616ce6c7a6e5e79f6425d20cd74b788ffd Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Mon, 20 Feb 2023 11:09:23 +1100 Subject: [PATCH] Renamed isConnectionString to validateConnectionString (#22) --- status_go.nim | 20 ++++++++++++++++++++ status_go/impl.nim | 10 +++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/status_go.nim b/status_go.nim index c22f22a..1fde66a 100644 --- a/status_go.nim +++ b/status_go.nim @@ -363,4 +363,24 @@ proc switchFleet*(newFleet: string, configJSON: string): string = proc generateImages*(imagePath: string, aX: int, aY: int, bX: int, bY: int): string = var funcOut = go_shim.generateImages(imagePath.cstring, aX.cint, aY.cint, bX.cint, bY.cint) defer: go_shim.free(funcOut) + return $funcOut + +proc getConnectionStringForBeingBootstrapped*(configJSON: string): string = + var funcOut = go_shim.getConnectionStringForBeingBootstrapped(configJSON.cstring) + defer: go_shim.free(funcOut) + return $funcOut + +proc getConnectionStringForBootstrappingAnotherDevice*(configJSON: string): string = + var funcOut = go_shim.getConnectionStringForBootstrappingAnotherDevice(configJSON.cstring) + defer: go_shim.free(funcOut) + return $funcOut + +proc inputConnectionStringForBootstrapping*(connectionString: string, configJSON: string): string = + var funcOut = go_shim.inputConnectionStringForBootstrapping(connectionString.cstring, configJSON.cstring) + defer: go_shim.free(funcOut) + return $funcOut + +proc validateConnectionString*(connectionString: string): string = + var funcOut = go_shim.validateConnectionString(connectionString.cstring) + defer: go_shim.free(funcOut) return $funcOut \ No newline at end of file diff --git a/status_go/impl.nim b/status_go/impl.nim index 4591c26..e3914b2 100644 --- a/status_go/impl.nim +++ b/status_go/impl.nim @@ -147,4 +147,12 @@ proc getPasswordStrengthScore*(paramsJSON: cstring): cstring {.importc: "GetPass proc switchFleet*(newFleet: cstring, configJSON: cstring): cstring{.importc: "SwitchFleet".} -proc generateImages*(imagePath: cstring, aX: cint, aY: cint, bX: cint, bY: cint): cstring {.importc: "GenerateImages".} \ No newline at end of file +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".} \ No newline at end of file