diff --git a/src/Neo.CLI/CLI/MainService.Tools.cs b/src/Neo.CLI/CLI/MainService.Tools.cs index c000b48655..b83923200b 100644 --- a/src/Neo.CLI/CLI/MainService.Tools.cs +++ b/src/Neo.CLI/CLI/MainService.Tools.cs @@ -70,6 +70,17 @@ private void OnParseCommand(string value) } } + /// + /// Read .nef file from path and print its content in base64 + /// + [ParseFunction(".nef file path to content base64")] + private string? NefPathToContentBase64(string path) + { + if (Path.GetExtension(path).ToLower() != ".nef") return null; + if (!File.Exists(path)) return null; + return Convert.ToBase64String(File.ReadAllBytes(path)); + } + /// /// Little-endian to Big-endian /// input: ce616f7f74617e0fc4b805583af2602a238df63f