How to create light wallet in Web3J?

0 votes

I am trying to create light wallet for my android app and I am using the following code to do it:

String seed = UUID.randomUUID().toString();

ECKeyPair exKey = Keys.createEcKeyPair();


WalletFile wallet = Wallet.createLight(seed,exKey);

I am able to create the wallet but the creation takes 10-15mins. Is there a way to do it faster?

Aug 10, 2018 in Blockchain by digger
• 27,630 points

retagged Nov 22, 2018 by Kalgi 334 views

1 answer to this question.

0 votes

You can use this method to create the wallet faster:

try {
    ECKeyPair ecKeyPair = Keys.createEcKeyPair();
    BigInteger privateKeyInDec = ecKeyPair.getPrivateKey();
    String sPrivatekeyInHex = privateKeyInDec.toString(16);


    WalletFile aWallet = Wallet.createLight(UUID.randomUUID().toString(), ecKeyPair);
    String sAddress = aWallet.getAddress();
} catch (CipherException e | InvalidAlgorithmParameterException e | NoSuchAlgorithmException e | NoSuchProviderException e) {
    //
}
answered Aug 10, 2018 by slayer
• 29,050 points

Related Questions In Blockchain

0 votes
1 answer

How to create a new wallet on a blockchain?

Firstly, you need to have a clear ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
62 views
0 votes
1 answer

How to create tokens in smart contracts from node.js?

Any modification to the Ethereum Blockchain will ...READ MORE

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

How to create a Genesis Block in a Private Network?

{     "nonce": "0x0000000000000042",     "difficulty": "0x000000100",     "alloc": {     },     "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",     "coinbase": "0x0000000000000000000000000000000000000000",     "timestamp": "0x00",     "parentHash": ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 27,630 points
162 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to create channels in Hyperledger Sawtooth?

There are two features that I know ...READ MORE

answered Aug 9, 2018 in Blockchain by slayer
• 29,050 points
1,005 views