siteSignFuture method

Future<MessageOrPromptOrError> siteSignFuture({
  1. String? privatekey,
  2. String? inner_path,
  3. bool remove_missing_optional = false,
  4. bool update_changed_files = false,
  5. bool response_ok = true,
})

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

Implementation

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