siteSignFuture method

Future<MessageOrPromptOrError> siteSignFuture({
  1. String? privatekey,
  2. String? innerPath,
  3. bool removeMissingOptional = false,
  4. bool updateChangedFiles = false,
  5. bool responseOk = true,
})

Return: "ok" on success, the error message otherwise.

Implementation

Future<MessageOrPromptOrError> siteSignFuture({
  String? privatekey,
  String? innerPath,
  bool removeMissingOptional = false,
  bool updateChangedFiles = false,
  bool responseOk = true,
}) async {
  var params = {};
  if (innerPath != null) params['inner_path'] = innerPath;
  if (privatekey != null) params['privatekey'] = privatekey;
  params['remove_missing_optional'] = removeMissingOptional;
  params['update_changed_files'] = updateChangedFiles;
  params['response_ok'] = responseOk;
  var resultStr = await ZeroNet.instance.cmdFuture(
    ZeroNetCmd.siteSign,
    params: params,
  );
  return resultStr.toMsgOrPromptOrErr;
}