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
• 26,740 points

retagged Nov 23, 2018 by Kalgi 1,804 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,350 points

Related Questions In Blockchain

0 votes
0 answers

hd wallet bip44 in js - how to create an address for a chain other than bitcoin?

I have a small script basically taken ...READ MORE

Mar 2, 2022 in Blockchain by Aditya
• 7,680 points
834 views
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
1,118 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 27, 2018 in Blockchain by Shashank
• 10,400 points
1,425 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
• 26,740 points
1,809 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
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,350 points
1,847 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP