Client: rename sk_locator
into sk_uri
To prepare upcoming patch where `sk_locator = Uri.t`.
This commit is contained in:
parent
361b3db3e8
commit
80dd9ebf24
@ -43,12 +43,12 @@ module type LOCATOR = sig
|
||||
val pp : Format.formatter -> t -> unit
|
||||
end
|
||||
|
||||
type sk_locator = Sk_locator of { scheme : string ; location : location }
|
||||
type pk_locator = Pk_locator of { scheme : string ; location : location }
|
||||
type sk_uri = Sk_locator of { scheme : string ; location : location }
|
||||
type pk_uri = Pk_locator of { scheme : string ; location : location }
|
||||
|
||||
module Sk_locator = struct
|
||||
let name = "secret key"
|
||||
type t = sk_locator
|
||||
type t = sk_uri
|
||||
|
||||
let create ~scheme ~location =
|
||||
Sk_locator { scheme ; location }
|
||||
@ -65,7 +65,7 @@ end
|
||||
|
||||
module Pk_locator = struct
|
||||
let name = "public key"
|
||||
type t = pk_locator
|
||||
type t = pk_uri
|
||||
|
||||
let create ~scheme ~location =
|
||||
Pk_locator { scheme ; location }
|
||||
@ -125,12 +125,12 @@ module type SIGNER = sig
|
||||
val title : string
|
||||
val description : string
|
||||
val init : #Client_context.io_wallet -> unit tzresult Lwt.t
|
||||
val sk_locator_of_human_input : #Client_context.io_wallet -> string list -> sk_locator tzresult Lwt.t
|
||||
val pk_locator_of_human_input : #Client_context.io_wallet -> string list -> pk_locator tzresult Lwt.t
|
||||
val sk_of_locator : sk_locator -> secret_key tzresult Lwt.t
|
||||
val pk_of_locator : pk_locator -> public_key tzresult Lwt.t
|
||||
val sk_to_locator : secret_key -> sk_locator Lwt.t
|
||||
val pk_to_locator : public_key -> pk_locator Lwt.t
|
||||
val sk_locator_of_human_input : #Client_context.io_wallet -> string list -> sk_uri tzresult Lwt.t
|
||||
val pk_locator_of_human_input : #Client_context.io_wallet -> string list -> pk_uri tzresult Lwt.t
|
||||
val sk_of_locator : sk_uri -> secret_key tzresult Lwt.t
|
||||
val pk_of_locator : pk_uri -> public_key tzresult Lwt.t
|
||||
val sk_to_locator : secret_key -> sk_uri Lwt.t
|
||||
val pk_to_locator : public_key -> pk_uri Lwt.t
|
||||
val neuterize : secret_key -> public_key Lwt.t
|
||||
val public_key : public_key -> Signature.Public_key.t tzresult Lwt.t
|
||||
val public_key_hash : public_key -> Signature.Public_key_hash.t tzresult Lwt.t
|
||||
|
@ -10,8 +10,8 @@
|
||||
(** {2 Location of keys using schemes} *)
|
||||
|
||||
type location = string list
|
||||
type sk_locator = Sk_locator of { scheme : string ; location : location }
|
||||
type pk_locator = Pk_locator of { scheme : string ; location : location }
|
||||
type sk_uri = Sk_locator of { scheme : string ; location : location }
|
||||
type pk_uri = Pk_locator of { scheme : string ; location : location }
|
||||
|
||||
module type LOCATOR = sig
|
||||
val name : string
|
||||
@ -24,17 +24,17 @@ module type LOCATOR = sig
|
||||
val pp : Format.formatter -> t -> unit
|
||||
end
|
||||
|
||||
module Secret_key_locator : LOCATOR with type t = sk_locator
|
||||
module Public_key_locator : LOCATOR with type t = pk_locator
|
||||
module Secret_key_locator : LOCATOR with type t = sk_uri
|
||||
module Public_key_locator : LOCATOR with type t = pk_uri
|
||||
|
||||
(** {2 Cryptographic keys tables } *)
|
||||
|
||||
module Public_key_hash :
|
||||
Client_aliases.Alias with type t = Signature.Public_key_hash.t
|
||||
module Public_key :
|
||||
Client_aliases.Alias with type t = pk_locator
|
||||
Client_aliases.Alias with type t = pk_uri
|
||||
module Secret_key :
|
||||
Client_aliases.Alias with type t = sk_locator
|
||||
Client_aliases.Alias with type t = sk_uri
|
||||
|
||||
(** {2 Interface for external signing modules.} *)
|
||||
|
||||
@ -59,27 +59,27 @@ module type SIGNER = sig
|
||||
dependent). *)
|
||||
|
||||
val sk_locator_of_human_input :
|
||||
#Client_context.io_wallet -> string list -> sk_locator tzresult Lwt.t
|
||||
#Client_context.io_wallet -> string list -> sk_uri tzresult Lwt.t
|
||||
(** [sk_locator_of_human_input wallet spec] is the [sk_locator]
|
||||
corresponding to the human readable specification [spec] (plugin
|
||||
dependent). *)
|
||||
|
||||
val pk_locator_of_human_input :
|
||||
#Client_context.io_wallet -> string list -> pk_locator tzresult Lwt.t
|
||||
#Client_context.io_wallet -> string list -> pk_uri tzresult Lwt.t
|
||||
(** [pk_locator_of_human_input wallet spec] is the [pk_locator]
|
||||
corresponding to the human readable specification [spec] (plugin
|
||||
dependent). *)
|
||||
|
||||
val sk_of_locator : sk_locator -> secret_key tzresult Lwt.t
|
||||
val sk_of_locator : sk_uri -> secret_key tzresult Lwt.t
|
||||
(** [sk_of_locator skloc] is the secret key at [skloc]. *)
|
||||
|
||||
val pk_of_locator : pk_locator -> public_key tzresult Lwt.t
|
||||
val pk_of_locator : pk_uri -> public_key tzresult Lwt.t
|
||||
(** [pk_of_locator pkloc] is the public key at [pkloc]. *)
|
||||
|
||||
val sk_to_locator : secret_key -> sk_locator Lwt.t
|
||||
val sk_to_locator : secret_key -> sk_uri Lwt.t
|
||||
(** [sk_to_locator sk] is the location of secret key [sk]. *)
|
||||
|
||||
val pk_to_locator : public_key -> pk_locator Lwt.t
|
||||
val pk_to_locator : public_key -> pk_uri Lwt.t
|
||||
(** [pk_to_locator pk] is the location of public key [pk]. *)
|
||||
|
||||
val neuterize : secret_key -> public_key Lwt.t
|
||||
@ -110,12 +110,12 @@ val find_signer_for_key :
|
||||
val sign :
|
||||
?watermark:Signature.watermark ->
|
||||
#Client_context.io_wallet ->
|
||||
sk_locator -> MBytes.t -> Signature.t tzresult Lwt.t
|
||||
sk_uri -> MBytes.t -> Signature.t tzresult Lwt.t
|
||||
|
||||
val append :
|
||||
?watermark:Signature.watermark ->
|
||||
#Client_context.io_wallet ->
|
||||
sk_locator -> MBytes.t -> MBytes.t tzresult Lwt.t
|
||||
sk_uri -> MBytes.t -> MBytes.t tzresult Lwt.t
|
||||
|
||||
val gen_keys :
|
||||
?force:bool ->
|
||||
@ -139,16 +139,16 @@ val gen_keys_containing :
|
||||
|
||||
val list_keys :
|
||||
#Client_context.wallet ->
|
||||
(string * Public_key_hash.t * pk_locator option * sk_locator option) list tzresult Lwt.t
|
||||
(string * Public_key_hash.t * pk_uri option * sk_uri option) list tzresult Lwt.t
|
||||
|
||||
val alias_keys :
|
||||
#Client_context.wallet -> string ->
|
||||
(Public_key_hash.t * pk_locator option * sk_locator option) option tzresult Lwt.t
|
||||
(Public_key_hash.t * pk_uri option * sk_uri option) option tzresult Lwt.t
|
||||
|
||||
val get_key:
|
||||
#Client_context.io_wallet ->
|
||||
Public_key_hash.t ->
|
||||
(string * Signature.Public_key.t * sk_locator) tzresult Lwt.t
|
||||
(string * Signature.Public_key.t * sk_uri) tzresult Lwt.t
|
||||
|
||||
val get_public_key:
|
||||
#Client_context.io_wallet ->
|
||||
@ -157,6 +157,6 @@ val get_public_key:
|
||||
|
||||
val get_keys:
|
||||
#Client_context.io_wallet ->
|
||||
(string * Public_key_hash.t * Signature.Public_key.t * sk_locator) list tzresult Lwt.t
|
||||
(string * Public_key_hash.t * Signature.Public_key.t * sk_uri) list tzresult Lwt.t
|
||||
|
||||
val force_switch : unit -> (bool, 'ctx) Clic.arg
|
||||
|
@ -13,7 +13,7 @@ open Alpha_context
|
||||
val forge_endorsement:
|
||||
#Proto_alpha.full ->
|
||||
Block_services.block ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
?slots:int list ->
|
||||
?max_priority:int ->
|
||||
public_key ->
|
||||
|
@ -23,7 +23,7 @@ val inject_block:
|
||||
shell_header:Block_header.shell_header ->
|
||||
priority:int ->
|
||||
?seed_nonce_hash:Nonce_hash.t ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
Operation.raw list list ->
|
||||
Block_hash.t tzresult Lwt.t
|
||||
(** [inject_block cctxt blk ?force ~priority ~timestamp ~fitness
|
||||
@ -45,7 +45,7 @@ val forge_block:
|
||||
?timestamp:Time.t ->
|
||||
priority:[`Set of int | `Auto of (public_key_hash * int option * bool)] ->
|
||||
?seed_nonce_hash:Nonce_hash.t ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
unit ->
|
||||
Block_hash.t tzresult Lwt.t
|
||||
(** [forge_block cctxt parent_blk ?force ?operations ?best_effort
|
||||
|
@ -18,7 +18,7 @@ val bake_block:
|
||||
?max_priority: int ->
|
||||
?free_baking: bool ->
|
||||
?minimal_timestamp: bool ->
|
||||
?src_sk:Client_keys.sk_locator ->
|
||||
?src_sk:Client_keys.sk_uri ->
|
||||
public_key_hash ->
|
||||
unit tzresult Lwt.t
|
||||
|
||||
|
@ -26,7 +26,7 @@ val get_manager :
|
||||
Block_services.block ->
|
||||
Contract.t ->
|
||||
(string * public_key_hash *
|
||||
public_key * Client_keys.sk_locator) tzresult Lwt.t
|
||||
public_key * Client_keys.sk_uri) tzresult Lwt.t
|
||||
|
||||
val get_balance:
|
||||
#Proto_alpha.rpc_context ->
|
||||
@ -40,7 +40,7 @@ val set_delegate :
|
||||
fee:Tez.tez ->
|
||||
Contract.t ->
|
||||
src_pk:public_key ->
|
||||
manager_sk:Client_keys.sk_locator ->
|
||||
manager_sk:Client_keys.sk_uri ->
|
||||
public_key_hash option ->
|
||||
Operation_list_hash.elt tzresult Lwt.t
|
||||
|
||||
@ -48,7 +48,7 @@ val register_as_delegate:
|
||||
#Proto_alpha.full ->
|
||||
Block_services.block ->
|
||||
fee:Tez.tez ->
|
||||
manager_sk:Client_keys.sk_locator ->
|
||||
manager_sk:Client_keys.sk_uri ->
|
||||
public_key -> Operation_list_hash.elt tzresult Lwt.t
|
||||
|
||||
val operation_submitted_message :
|
||||
@ -60,13 +60,13 @@ val source_to_keys:
|
||||
#Proto_alpha.full ->
|
||||
Block_services.block ->
|
||||
Contract.t ->
|
||||
(public_key * Client_keys.sk_locator) tzresult Lwt.t
|
||||
(public_key * Client_keys.sk_uri) tzresult Lwt.t
|
||||
|
||||
val originate_account :
|
||||
?branch:int ->
|
||||
source:Contract.t ->
|
||||
src_pk:public_key ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
manager_pkh:public_key_hash ->
|
||||
?delegatable:bool ->
|
||||
?delegate:public_key_hash ->
|
||||
@ -99,7 +99,7 @@ val originate_contract:
|
||||
balance:Tez.t ->
|
||||
source:Contract.t ->
|
||||
src_pk:public_key ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
code:Script.expr ->
|
||||
#Proto_alpha.full ->
|
||||
(Operation_hash.t * Contract.t) tzresult Lwt.t
|
||||
@ -110,7 +110,7 @@ val transfer :
|
||||
?branch:int ->
|
||||
source:Contract.t ->
|
||||
src_pk:public_key ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
destination:Contract.t ->
|
||||
?arg:string ->
|
||||
amount:Tez.t ->
|
||||
@ -124,7 +124,7 @@ val reveal :
|
||||
?branch:int ->
|
||||
source:Contract.t ->
|
||||
src_pk:public_key ->
|
||||
src_sk:Client_keys.sk_locator ->
|
||||
src_sk:Client_keys.sk_uri ->
|
||||
fee:Tez.t ->
|
||||
unit -> Operation_hash.t tzresult Lwt.t
|
||||
|
||||
|
@ -53,7 +53,7 @@ val print_trace_result :
|
||||
val hash_and_sign :
|
||||
Michelson_v1_parser.parsed ->
|
||||
Michelson_v1_parser.parsed ->
|
||||
Client_keys.sk_locator ->
|
||||
Client_keys.sk_uri ->
|
||||
Block_services.block ->
|
||||
#Proto_alpha.full ->
|
||||
(string * string) tzresult Lwt.t
|
||||
|
@ -14,6 +14,6 @@ val bake:
|
||||
?timestamp: Time.t ->
|
||||
Block_services.block ->
|
||||
Data.Command.t ->
|
||||
Client_keys.sk_locator ->
|
||||
Client_keys.sk_uri ->
|
||||
Block_hash.t tzresult Lwt.t
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user