如何在CLI钱包中添加和从原始帐户进行转移
2 个回答
- 投票数
-
- 2019-03-02
要将原始帐户添加到cli钱包:
tezos-client remember contract <new alias> <kt1...>
检查原始帐户是否已成功添加到客户端:
tezos-client list known contracts
显示原始帐户的余额:
tezos-client get balance for <new alias>
要从原始帐户进行转移,客户端必须知道隐式帐户的秘密密钥(tz1 ...):
tezos-client import secret key <new alias> <secret key>
然后从原始帐户进行的转帐类似于隐式帐户的转帐:
tezos-client transfer <amount> from <alias of kt1...> to <destination PKH>
请注意,这些示例适用于在另一个钱包中创建隐式帐户和原始帐户,并且您也要在tezos-client中使用这些帐户的用例.
如果要使用tezos-client从隐式帐户创建原始帐户,请使用@cousinit给出的命令.
To add an originated account to the cli wallet:
tezos-client remember contract <new alias> <kt1...>
Check if the originated account was successfully added to the client:
tezos-client list known contracts
Show balance of the originated account:
tezos-client get balance for <new alias>
In order to transfer from the originated account, the secret key of the implicit account (tz1...) must be known by the client:
tezos-client import secret key <new alias> <secret key>
Then transfers from originated accounts are similar to transfers for implicit accounts:
tezos-client transfer <amount> from <alias of kt1...> to <destination PKH>
Note that these examples are for use cases when you created the implicit and originated accounts in another wallet and you want to use these accounts also within the tezos-client.
If you want to create an originated account from an implicit account with the tezos-client, then use the command given by @cousinit.
-
- 2019-02-09
在使用Tezos命令行客户端时,知道可以给帐户起一个别名以使其更容易输入命令很有用:
client add address <new alias> <public key hash to which alias applies>
要为给定的tz1别名创建原始帐户,您需要知道它将消耗0.257 xtz,此外,您还需要指定操作费用.
您可以在一个命令中完成全部操作,而不是分多个步骤执行并支付多项费用.假设您希望原始帐户能够将其金额委托给面包师,那么您要么需要将其标记为可代理帐户,要么在创建帐户时将其添加.
以下命令将为指定的tz1帐户创建一个原始帐户,并将1000xtz资金转入该帐户,将其标记为可代理帐户,并分配其委托人,同时支付0.002 xtz的单笔费用,您还会看到额外的0.257耗尽tz1帐户的
client originate account <enter an alias for the new account> for <alias or pkh of your tz1> transferring 1000.0 from <alias or pkh of your tz1> --delegate <alias or pkh of the account to which you want to delegate your funds> --fee 0.002
when working with the Tezos command line client it's useful know that you can give accounts an alias to make it easier to enter commands:
client add address <new alias> <public key hash to which alias applies>
To create an originated account for a given tz1 alias, you need to be aware that it will burn 0.257 xtz, plus you need to specify a fee for the operation.
Rather than do it in multiple steps and pay multiple fees, you can do it all in one command. Assuming you want the originated account to able to delegate its amount to a baker, then you either need to flag it as delegatable or add the delegate at the time you create it.
The following command will create an originated account for the specified tz1 account, and transfer 1000xtz funds to it, mark it as delegatable, and assign its delegate while paying a single fee of 0.002 xtz PLUS you will see an extra 0.257 burned out of the tz1 account
client originate account <enter an alias for the new account> for <alias or pkh of your tz1> transferring 1000.0 from <alias or pkh of your tz1> --delegate <alias or pkh of the account to which you want to delegate your funds> --fee 0.002
-
我编辑了原始问题以阐明含义,因为我想知道如何在管理者的私钥(tz1)可用的情况下简单地监视kt1帐户以及如何从自己的kt1地址中消费.我很感谢你的回答.I edited the original question to clarify the meaning, as I wanted to know how a kt1 account can simply be monitored and how one can spend from own kt1 addresses when the private key for the manager (tz1) is available. I appreciate your answer though.
- 1
- 2019-02-09
- cryptodad
在Tezos客户手册中,我仅找到用于获取原始帐户(合同)的经理和余额的命令.如何将这样的帐户添加到客户端以监控余额(例如tz1地址的
add address <new> <src>
),以及当经理的秘密密钥(tz1地址)时可用,如何从中支出?