简体   繁体   中英

how to use Credential wallet path with metamask account on infura in Web3j

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

  1. How to connect rinkeby network using Web3j.

  2. 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM