1

When running a local node (on a Mac), the RPC API uses a different location to locate the wallets compared to the cleos CLI.

RPC (E.g. http://127.0.0.1:8888/v1/wallet/list_wallets) uses:

/Users/<username>/Library/Application Support/eosio/nodeos/data/./default.wallet

cleos (E.g. cleos wallet unlock) uses:

/Users/<username>/eosio-wallet/./default.wallet

Q1. Why are the wallet locations different for the same nodeos running locally when accessed via RPC vs cleos?

Q2. Is there a way to make them both reference the same location for wallets?

This is how I run my node locally:

nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --contracts-console

2 Answers 2

3

The keosd wallet daemon has an option to set the wallet directory.

--wallet-dir arg (=".") The path of the wallet files (absolute path or relative to application data dir)

If you have the wallet plugin enabled in nodeos, the same parameter can be used for it to set its wallet location as well.

2
  • Thanks! This should help. But do you know why the locations are different for the same nodeos running locally but accessed differently (one via cleos and one via rpc)?
    – ken
    Commented Jun 27, 2018 at 22:05
  • Do you have keosd running? It's possible that cleos is connecting to it silently without telling you, while the RPC call is explicitly connecting to nodeos. My usual next debugging step is to fire up tcpdump and watch the traffic to see if the cleos command is doing something different than I expect. Commented Jun 28, 2018 at 17:09
0

Can't you just symlink one directory to other?

mv /Users//eosio-wallet /Users//eosio-wallet.backup; cd /Users//Library/Application Support/eosio/nodeos; ln -s ./data /Users//eosio-wallet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.