Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/ Credentials credentials = WalletUtils.loadCredentials("password", "/path/to/walletfile");
How to connect rinkeby network using Web3j.
I try to change "/path/to/walletfile"
by a private key of metamask account. Without success.
How can I make it works? Thx.
An easy way to do this is using your private key. In metamask click "account details" and "export private key".
Then use Credentials.create("YourPrivateKey")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.