Opam: fix dependencies

This commit is contained in:
Grégoire Henry 2018-05-26 17:32:10 +02:00
parent f43710694b
commit fd72b47263
12 changed files with 20 additions and 99 deletions

View File

@ -17,6 +17,7 @@ depends: [
"tezos-baking-alpha"
"tezos-baking-alpha-commands"
"tezos-client-base-unix"
"tezos-signer-backends"
"tezos-node" { test }
]
build: [

View File

@ -11,13 +11,12 @@ depends: [
"jbuilder" { build & = "1.0+beta19.1" }
"tezos-base"
"tezos-client-base"
"tezos-client-genesis"
"tezos-client-alpha"
"tezos-client-alpha-commands"
"tezos-baking-alpha"
"tezos-baking-alpha-commands"
"tezos-client-base-unix"
"tezos-node" { test }
"tezos-client-commands"
"tezos-signer-services"
"tezos-rpc-http"
"tezos-stdlib-unix"
"tezos-signer-backends"
]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]

View File

@ -4,7 +4,6 @@
((name tezos_client_base)
(public_name tezos-client-base)
(libraries (tezos-base
tezos-stdlib-unix
tezos-shell-services
tezos-rpc))
(library_flags (:standard -linkall))
@ -12,7 +11,6 @@
-safe-string
-open Tezos_base__TzPervasives
-open Tezos_rpc
-open Tezos_stdlib_unix
-open Tezos_shell_services))))
(alias

View File

@ -9,8 +9,6 @@
tezos-stdlib-unix
tezos-rpc-http
tezos-signer-backends
pbkdf
bip39
tezos-shell-services))
(flags (:standard -w -9+27-30-32-40@8
-safe-string

View File

@ -11,6 +11,9 @@ depends: [
"jbuilder" { build & = "1.0+beta19.1" }
"tezos-base"
"tezos-client-base"
"tezos-stdlib-unix"
"tezos-rpc-http"
"tezos-signer-backends"
"tezos-client-commands"
]
build: [

View File

@ -10,11 +10,10 @@ depends: [
"ocamlfind" { build }
"jbuilder" { build & = "1.0+beta19.1" }
"tezos-base"
"tezos-stdlib-unix"
"tezos-shell-services"
"tezos-storage"
"tezos-rpc-http"
"tezos-client-base"
"tezos-rpc"
"tezos-shell-services"
"tezos-signer-backends"
]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]

View File

@ -119,75 +119,6 @@ let encrypt cctxt sk =
Hashtbl.replace decrypted sk_uri sk ;
return sk_uri
(*
let rec get_boolean_answer (cctxt : #Client_context.io_wallet) ~default ~msg =
let prompt = if default then "(Y/n/q)" else "(y/N/q)" in
cctxt#prompt "%s %s: " msg prompt >>= fun gen ->
match default, String.lowercase_ascii gen with
| default, "" -> return default
| _, "y" -> return true
| _, "n" -> return false
| _, "q" -> failwith "Exit by user request."
| _ -> get_boolean_answer cctxt ~msg ~default
let rec sk_of_mnemonic (cctxt : #Client_context.io_wallet) =
cctxt#prompt "Enter the e-mail used for the paper wallet: " >>= fun email ->
let rec loop_words acc i =
if i > 14 then Lwt.return (List.rev acc) else
cctxt#prompt_password "Enter word %d: " i >>= fun word ->
match Bip39.index_of_word word with
| None -> loop_words acc i
| Some wordidx -> loop_words (wordidx :: acc) (succ i) in
loop_words [] 0 >>= fun words ->
match Bip39.of_indices words with
| None -> assert false
| Some t ->
cctxt#prompt_password
"Enter the password used for the paper wallet: " >>= fun password ->
(* TODO: unicode normalization (NFKD)... *)
let sk = Bip39.to_seed ~passphrase:(email ^ password) t in
let sk = Cstruct.(to_bigarray (sub sk 0 32)) in
let sk : Signature.Secret_key.t =
Ed25519
(Data_encoding.Binary.of_bytes_exn Ed25519.Secret_key.encoding sk) in
let pk = Signature.Secret_key.to_public_key sk in
let pkh = Signature.Public_key.hash pk in
let msg = Format.asprintf
"Your public Tezos address is %a is that correct?"
Signature.Public_key_hash.pp pkh in
get_boolean_answer cctxt ~msg ~default:true >>=? function
| true -> return sk
| false -> sk_of_mnemonic cctxt
*)
(*
let sk_locator_of_human_input cctxt = function
| sk :: _ ->
Lwt.return (Signature.Secret_key.of_b58check sk) >>=? fun sk ->
encrypt_sk cctxt sk
| [] -> begin
get_boolean_answer
cctxt ~msg:"Generate a new key" ~default:true >>=? function
| true ->
let _, _, sk = Signature.generate_key () in
encrypt_sk cctxt sk
| false ->
get_boolean_answer cctxt
~msg:"Import key from fundraiser" ~default:true >>=? function
| false -> failwith "Goodbye."
| true ->
sk_of_mnemonic cctxt >>=? fun sk ->
encrypt_sk cctxt sk
end
*)
(*
let pk_locator_of_human_input _cctxt = function
| [] -> failwith "Missing public key argument."
| pk :: _ -> return (Public_key_locator.create ~scheme ~location:[pk])
*)
module Make(C : sig val cctxt: Client_context.prompter end) = struct
let scheme = "encrypted"

View File

@ -10,8 +10,12 @@ depends: [
"ocamlfind" { build }
"jbuilder" { build & = "1.0+beta19.1" }
"tezos-base"
"tezos-stdlib-unix"
"tezos-client-base"
"tezos-client-commands"
"tezos-rpc-http"
"tezos-signer-services"
"pbkdf"
"bip39"
]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]

View File

@ -22,20 +22,6 @@ let description =
The format for importing public keys is the raw Base58-encoded \
key (starting with 'edpk')."
(*
let sk_locator_of_human_input _cctxt = function
| sk :: _ ->
return (Secret_key_locator.create ~scheme ~location:[sk])
| [] ->
let _, _, sk = Ed25519.generate_key () in
return (Secret_key_locator.create ~scheme
~location:[Ed25519.Secret_key.to_b58check sk])
let pk_locator_of_human_input _cctxt = function
| [] -> failwith "Missing public key argument"
| pk :: _ -> return (Public_key_locator.create ~scheme ~location:[pk])
*)
let secret_key sk_uri =
Lwt.return
(Signature.Secret_key.of_b58check (Uri.path (sk_uri : sk_uri :> Uri.t)))

View File

@ -11,7 +11,7 @@ depends: [
"jbuilder" { build & = "1.0+beta19.1" }
"tezos-base"
"tezos-client-base"
"tezos-client-commands"
"tezos-rpc"
]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]

View File

@ -17,6 +17,7 @@ depends: [
"tezos-client-commands"
"tezos-client-alpha"
"tezos-baking-alpha"
"tezos-signer-backends" { test }
]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]

View File

@ -14,6 +14,7 @@ depends: [
"tezos-protocol-alpha"
"tezos-shell-services"
"tezos-client-base"
"tezos-signer-backends"
]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]