What are the wallet path credentials for Web3j?

+2 votes

I want to develop smart contracts from my host with java + web3j to a private ethereum network which runs on my virtual machine. I am using the readme guide https://github.com/web3j/web3j. Look at the following lines:

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:8545/
Credentials credentials = WalletUtils.loadCredentials("password", "/path/to/walletfile");

 How should I create this wallet? Should I generate an account on my VM and then copy wallet.json file to my host?

Jun 26, 2018 in Blockchain by Johnathon
• 9,030 points
178 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Follow the below steps:

  • Go to the private key file (For geth: AppData/Ethereum/keystore and for ethAppData/Web3/keys)
  • Find the key. It'll something like this: 
Ethereum\keystore\UTC--2018-3-14T11-51-50.069518500Z--228fh83c240g512be19d3f28dna5d7f0333jfoim
  • Use this as the second parameter in the WalletUtils.loadCredentials 
To create the wallet using web3j:
String fileName = WalletUtils.generateNewWalletFile(
        "your password",
        new File("/path/to/destination"));


Alternatively, you can use https://www.myetherwallet.com/
answered Aug 2, 2018 by Omkar
• 65,810 points

Related Questions In Blockchain

0 votes
1 answer

What path should I give for credentials in web3j?

WalletUtils.loadCredentials can be buggy, I would recommend ...READ MORE

answered Jun 26, 2018 in Blockchain by Shashank
• 10,330 points
66 views
0 votes
1 answer

What happen to the mining fee for the blocks that are stale?

As I understood the forks of the ...READ MORE

answered Jun 4, 2018 in Blockchain by Shashank
• 10,330 points
20 views
+1 vote
1 answer

What are the difference between various Hyperledger Projects?

Hyperledger incubates a plethora of business blockchain ...READ MORE

answered Mar 26, 2018 in Blockchain by Perry
• 16,450 points
223 views
+4 votes
3 answers

What are the implementations of IBM blockchain?

IBM is an open source community of ...READ MORE

answered Mar 29, 2018 in Blockchain by Christine
• 15,790 points
30 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
60 views
0 votes
1 answer
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
92 views
+15 votes
2 answers

What are the various blockchain smart contracts platforms?

While Ethereum is the most popular platform ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,030 points
96 views
+1 vote
7 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.