0

Help me out how do i resolve the issue of ethereum smartcontract for getting my wallet when i enter my private key in the text area

Use WalletUtils functionality
The WalletUtils class can be used to load your credentials from various 
formats:

WalletUtils.loadCredentials(String password,String source)
WalletUtils.loadBip39Credentials(String password,String mnemonic)
WalletUtils.loadBip39Credentials(String password,String mnemonic)
WalletUtils.loadJsonCredentials(String password,String content)

http://docs.web3j.io/latest/transactions/credentials/#use-walletutils-functionality

These are the methods provided by the web3j library can anyone help me out to import my wallet from ethereum using private key??

0

The methods listed on the question are related to wallet usage.

However, on the same link, the org.web3j.crypto.Credentials class is also listed as a wrapper to handle raw keys. This latter has a create method with different overloads you can use.

So, if you have a raw private key that you want to use to load credentials, you can use the following:

org.web3j.crypto.Credentials.create(String privateKey)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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