2018-05-24 02:26:10 +02:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2018-05-26 12:51:51 +02:00
|
|
|
let sign =
|
|
|
|
RPC_service.post_service
|
2018-05-24 02:26:10 +02:00
|
|
|
~description: "Sign a piece of data with a given remote key"
|
|
|
|
~query: RPC_query.empty
|
2018-05-26 12:51:51 +02:00
|
|
|
~input: Data_encoding.bytes
|
|
|
|
~output: Data_encoding.(obj1 (req "signature" Signature.encoding))
|
|
|
|
RPC_path.(root /: Signature.Public_key_hash.rpc_arg)
|
2018-05-24 02:26:10 +02:00
|
|
|
|
2018-05-26 12:51:51 +02:00
|
|
|
let public_key =
|
|
|
|
RPC_service.get_service
|
2018-05-24 02:26:10 +02:00
|
|
|
~description: "Retrieve the public key of a given remote key"
|
|
|
|
~query: RPC_query.empty
|
2018-05-26 12:51:51 +02:00
|
|
|
~output: Data_encoding.(obj1 (req "public_key" Signature.Public_key.encoding))
|
|
|
|
RPC_path.(root /: Signature.Public_key_hash.rpc_arg)
|