diff options
-rw-r--r-- | src/v1.erl | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -61,8 +61,9 @@ false -> binary_to_list( jiffy:encode( - [base64:encode(X) || - X <- plop:consistency(First, Second)])) + {[{consistency, + [base64:encode(X) || + X <- plop:consistency(First, Second)]}]})) end; _ -> html("get-sth-consistency: bad input:", Input) end, @@ -81,10 +82,11 @@ html("get-proof-by-hash: bad input:", [HashInput, TreeSizeInput]); false -> + {Index, Path} = plop:inclusion(Hash, TreeSize), binary_to_list( jiffy:encode( - [base64:encode(X) || - X <- plop:inclusion(Hash, TreeSize)])) + {[{leaf_index, Index}, + {audit_path, [base64:encode(X) || X <- Path]}]})) end; _ -> html("get-sth-proof-by-hash: bad input:", Input) end, |