Client: describe unsigned data commands

This commit is contained in:
Milo Davis 2018-04-26 14:32:50 -04:00 committed by Benjamin Canou
parent 0a88f1887c
commit ec7eeaaa0e

View File

@ -48,6 +48,10 @@ let alphanet =
{ Clic.name = "alphanet" ; { Clic.name = "alphanet" ;
title = "Alphanet only commands" } title = "Alphanet only commands" }
let binary_description =
{ Clic.name = "description" ;
title = "Binary Description" }
let commands () = let commands () =
let open Clic in let open Clic in
[ [
@ -369,4 +373,28 @@ let commands () =
return () return ()
end ; end ;
command ~group:binary_description ~desc:"Describe unsigned block header"
no_options
(fixed [ "describe" ; "unsigned" ; "block" ; "header" ])
begin fun () (cctxt : Proto_alpha.full) ->
cctxt#message "%a"
Data_encoding.Binary_schema.pp
(Data_encoding.Binary.describe
~toplevel_name:"Unsigned block header"
(Alpha_context.Block_header.unsigned_encoding)) >>= fun () ->
return ()
end ;
command ~group:binary_description ~desc:"Describe unsigned block header"
no_options
(fixed [ "describe" ; "unsigned" ; "operation" ])
begin fun () (cctxt : Proto_alpha.full) ->
cctxt#message "%a"
Data_encoding.Binary_schema.pp
(Data_encoding.Binary.describe
~toplevel_name:"Unsigned operation"
Alpha_context.Operation.unsigned_encoding) >>= fun () ->
return ()
end
] ]