Client: identity -> address

This commit is contained in:
Vincent Bernardoff 2018-06-10 10:45:11 +02:00 committed by Benjamin Canou
parent 3247a3f491
commit b022a605b4
8 changed files with 31 additions and 61 deletions

View File

@ -2844,8 +2844,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$error:
/* ... FIXME ... */
@ -3739,8 +3738,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string</pre>
</div>
@ -4998,8 +4996,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -5423,8 +5420,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -5703,8 +5699,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -6049,8 +6044,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -6313,8 +6307,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$error:
/* ... FIXME ... */
@ -6900,8 +6893,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -7029,8 +7021,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -7213,8 +7204,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.michelson_v1.expression:
/* Micheline expression (michelson_v1 variant) */
@ -7346,8 +7336,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$micheline.location:
/* Canonical location in a Micheline expression
@ -8271,8 +8260,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$error:
/* ... FIXME ... */
@ -8728,8 +8716,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$error:
/* ... FIXME ... */
@ -9185,8 +9172,7 @@ Protocol Alpha
$contract_id:
/* A contract handle
A contract notation as given to an RPC or inside scripts. Can be a
base58 public key hash, representing the implicit contract of this
identity, or a base58 originated contract hash. */
base58 implicit contract hash or a base58 originated contract hash. */
string
$error:
/* ... FIXME ... */

View File

@ -311,8 +311,8 @@ the appropriate value:
::
$ ./alphanet.sh client list known identities
my_identity: tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H (public key known) (secret key known)
$ ./alphanet.sh client list known addresses
my_account: tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H (public key known) (secret key known)
$ ./alphanet.sh client rpc post /chains/main/blocks/head/helpers/rights/baking/delegate/tz1iFY8aDskx9QGbgBy68SNAGgkc7AE2iG9H with {}
{ "ok":
[ { "level": 1400.000000, "priority": 2.000000,

View File

@ -448,8 +448,6 @@ usage() {
echo " $0 start [--rpc-port <int>] [OPTIONS]"
echo " Launch a full Tezos alphanet node in a docker container"
echo " automatically generating a new network identity."
echo " An account 'my_account' for a manager 'my_identity' is also"
echo " created to be used via the client."
echo " OPTIONS (others than --rpc-port) are directly passed to the"
echo " Tezos node, see '$0 shell tezos-node config --help'"
echo " for more details."

View File

@ -35,7 +35,7 @@ $client gen keys $key2 --sig secp256k1
$client gen keys $key3 --sig ed25519
# $client gen keys $key6 --sig p256
$client list known identities
$client list known addresses
$client get balance for bootstrap1
bake_after $client transfer 1,000 from bootstrap1 to $key1

View File

@ -83,20 +83,6 @@ wait_for_the_node_to_be_bootstraped() {
$client bootstrapped
}
## Account #################################################################
may_create_identity() {
if ! $client get balance for "my_identity" >/dev/null 2>&1 ; then
echo "Generating new manager key (known as 'my_identity')..."
$client gen keys "my_identity"
fi
if ! $client get balance for "my_account" >/dev/null 2>&1 ; then
echo "Creating new account for 'my_identity' (known as 'my_account')..."
$client forget contract "my_account" >/dev/null 2>&1 || true
$client originate free account "my_account" for "my_identity"
fi
}
## Baker ###################################################################
check_baker() {
@ -317,7 +303,7 @@ The client is now properly initialized. In the rest of this shell
session, you might now run \`tezos-client\` to communicate with a
tezos node launched with \`launch-sandboxed-node $1\`. For instance:
tezos-client rpc get /chains/main/blocks/head/metadata/protocol_hash
tezos-client rpc get /chains/main/blocks/head/metadata
Note: if the current protocol version, as reported by the previous
command, is "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im", you

View File

@ -202,9 +202,9 @@ let commands () : Client_context.io_wallet Clic.command list =
Signature.Public_key_hash.pp pkh >>= fun () ->
Public_key.add ~force cctxt name (pk_uri, public_key)) ;
command ~group ~desc: "Add an identity to the wallet."
command ~group ~desc: "Add an address to the wallet."
(args1 (Public_key.force_switch ()))
(prefixes [ "add" ; "identity" ]
(prefixes [ "add" ; "address" ]
@@ Public_key_hash.fresh_alias_param
@@ Public_key_hash.source_param
@@ stop)
@ -212,9 +212,9 @@ let commands () : Client_context.io_wallet Clic.command list =
Public_key_hash.of_fresh cctxt force name >>=? fun name ->
Public_key_hash.add ~force cctxt name hash) ;
command ~group ~desc: "List all identities and associated keys."
command ~group ~desc: "List all addresses and associated keys."
no_options
(fixed [ "list" ; "known" ; "identities" ])
(fixed [ "list" ; "known" ; "addresses" ])
(fun () (cctxt : #Client_context.io_wallet) ->
list_keys cctxt >>=? fun l ->
iter_s begin fun (name, pkh, pk, sk) ->
@ -232,16 +232,16 @@ let commands () : Client_context.io_wallet Clic.command list =
end >>= fun () -> return ()
end l) ;
command ~group ~desc: "Show the keys associated with an identity."
command ~group ~desc: "Show the keys associated with an implicit account."
(args1 show_private_switch)
(prefixes [ "show" ; "identity"]
(prefixes [ "show" ; "address"]
@@ Public_key_hash.alias_param
@@ stop)
(fun show_private (name, _) (cctxt : #Client_context.io_wallet) ->
alias_keys cctxt name >>=? fun key_info ->
match key_info with
| None ->
cctxt#message "No keys found for identity" >>= fun () ->
cctxt#message "No keys found for address" >>= fun () ->
return ()
| Some (pkh, pk, skloc) ->
cctxt#message "Hash: %a"

View File

@ -77,17 +77,17 @@ let arg_arg =
let delegate_arg =
Client_keys.Public_key_hash.source_arg
~long:"delegate"
~placeholder:"identity"
~placeholder:"address"
~doc:"delegate of the contract\n\
Must be a known identity."
Must be a known address."
()
let source_arg =
arg
~long:"source"
~placeholder:"identity"
~placeholder:"address"
~doc:"source of the deposits to be paid\n\
Must be a known identity."
Must be a known address."
string_parameter
let spendable_switch =

View File

@ -54,8 +54,8 @@ let encoding =
"A contract handle"
~description:
"A contract notation as given to an RPC or inside scripts. \
Can be a base58 public key hash, representing the implicit contract \
of this identity, or a base58 originated contract hash." @@
Can be a base58 implicit contract hash \
or a base58 originated contract hash." @@
splitted
~binary:
(union ~tag_size:`Uint8 [