EOS keosd

EOS keosd

  The program keosd, located in the eos/build/programs/keosd folder within the EOSIO/eos repository.

  如果自行编译 EOSIO/eos 仓库,则 keosd 位于仓库的 eos/build/programs/keosd 目录下。

  keosd 运行于本机,用于保存与管理秘钥,以及使用秘钥 sign transactions.

  通过 eos docker 可以启动 keosd,也即 keosd 运行于docker的 eosio 容器中。  keosd提供了RESTful 接口,通过 --http-server-address 选项指定 keosd监听的地址。

docker run --name eosio 
  --publish 7777:7777 
  --publish 127.0.0.1:5555:5555 
  --volume CONTRACTS_DIR:CONTRACTS_DIR 
  --detach 
  eosio/eos:v1.4.2 
  /bin/bash -c 
  "keosd --http-server-address=0.0.0.0:5555 & exec nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:7777 --access-control-allow-origin=* --contracts-console --http-validate-host=false --filter-on='*'"

  keosd保存的钱包默认位于容器的 ~/eosio-wallet/ 目录中,例如默认的钱包位于如下目录。可以通过 --data-dir 来指定钱包存储位置。

~/eosio-wallet/default.wallet

  keosd的配置默认位于如下地址,通过--config-dir 可以引用别处的配置。

~/eosio-wallet/config.ini

    默认如果15分钟内没有操作钱包,keosd会锁住这个钱包。可以通过 config.ini 中的 unlock-timeout(单位为秒) 选项来修改。将数值设置为非常大,能实现永不锁住。将数值设为0,即为始终锁住。

unlock-timeout = 900

  

  默认情况下,我们不直接使用 keosd 命令,而是通过 cleos或 RESTful 来操作 keosd。

参考:

1、https://developers.eos.io/keosd/docs/

2、https://developers.eos.io/keosd/v1.3.0/reference

3、https://developers.eos.io/eosio-home/docs/getting-the-software

原文地址:https://www.cnblogs.com/tekkaman/p/9955017.html