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,620 points

retagged Nov 22, 2018 by Kalgi 274 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,040 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
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
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,620 points
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,040 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.