0 votes
1 view
in Blockchain by (12.1k points)

When trying to use https://github.com/web3j/sample-project-gradle I encounter this code:

 // We then need to load our Ethereum wallet file

    // FIXME: Generate a new wallet file using the web3j command line tools https://docs.web3j.io/command_line.html

    Credentials credentials =

            WalletUtils.loadCredentials(

                    "<password>",

                    "/path/to/<walletfile>");

    log.info("Credentials loaded");

I wanted to use a network created by ganache-cli. I did successfully connect to the network but I can't find the wallet files. Is there a way to use here accounts generated by ganache-cli?

1 Answer

0 votes
by (28.5k points)

ganache-cli is a personal blockchain. It does not create wallet file, rather provides private key to load credentials.

Credentials credentials = Credentials.create("0x78c0cf2c035dda3c46953fb7b926f8ece0aa8bfed6c012e33d5e289e6e0c1ebc");

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...