How do I create an ether wallet?

+11 votes

I want to create users ether wallet through code. is there any api or something to create ether wallet which they can use to transfer & receive ether ?

Sep 12, 2018 in Blockchain by sabby
• 4,350 points
64 views

5 answers to this question.

+2 votes

First of all Ethereum network doesn't provide any API to create wallet. Any 40 digit hexadecimal string is a valid ethereum wallet with 0x as prefix. Each wallet is created using some private key. Private key is 64 digit hexadecimal string.

Ex: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaais a valid private key.

And you will find address corresponding to this private key to be 0x8fd379246834eac74B8419FfdA202CF8051F7A03

Private keys should be very strong and tough to guess. So practically it is created by key derivative function.

For Node.js i use keythereum

function createWallet(password) {
  const params = {keyBytes: 32, ivBytes: 16};
  const dk = keythereum.create(params);

  const options = {
    kdf: 'pbkdf2',
    cipher: 'aes-128-ctr',
    kdfparams: { c: 262144, dklen: 32, prf: 'hmac-sha256' }
  };
  const keyObject = keythereum.dump(password, dk.privateKey, dk.salt, dk.iv, options);
  return keyObject;
}
 /* for getting private key from keyObject */
function getPrivateKey(password, keyObject) {
  return keythereum.recover(password, keyObject);
}

const keyObject = createWallet("My Super secret password");
const walletAddress = '0x' + keyObject.address;

const privateKey = getPrivateKey("My Super secret password", keyObject);
answered Sep 12, 2018 by Perry
• 17,010 points
+2 votes

You can use web3py.

$ pip install web3

Add any provider on the node you are running:

>>> from web3 import Web3, KeepAliveRPCProvider, IPCProvider

Note that you should create only one RPCProvider per process, as it recycles underlying TCP/IP network connections between your process and Ethereum node.

>>> web3 = Web3(KeepAliveRPCProvider(host='localhost', port='8545'))

Or for an IPC based connection:

>>> web3 = Web3(IPCProvider())
>>> web3.personal.newAccount('the-passphrase')
['0xd3cda913deb6f67967b99d67acdfa1712c293601']

It created a new account.

answered Sep 12, 2018 by Voila
+2 votes

You can use pyethapp (python based client) for creating ethereum wallet, transferring funds.

Link: https://github.com/ethereum/pyethapp

It has very simple command to create account

$ pyethapp account new
answered Sep 12, 2018 by Scarlet
+2 votes
answered Sep 14, 2018 by Yogi
+2 votes

The Ethereum Wallet is a gateway to decentralized applications on the Ethereum blockchain. It allows you to hold and secure ether and other crypto-assets built on Ethereum, as well as write, deploy and use smart contracts.

You can download the Ethereum wallet from the official website. The link is : https://www.ethereum.org/

Scroll to the end of the page and you'll see the download button

answered Sep 14, 2018 by Shiva

Related Questions In Blockchain

0 votes
1 answer

How do I send ether from an EOA to a smart contract?

You include ether to send in the ...READ MORE

answered Sep 27, 2018 in Blockchain by digger
• 27,620 points
44 views
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
412 views
0 votes
1 answer

How do I get the total amount sent to an address?

If you are using web3JS you can ...READ MORE

answered Jul 18, 2018 in Blockchain by Johnathon
• 9,070 points
24 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
105 views
0 votes
1 answer
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
56 views
0 votes
1 answer

How can I create an online wallet without any 3rd party API on my PHP server?

With any approach, you need a bitcoin ...READ MORE

answered Aug 29, 2018 in Blockchain by Perry
• 17,010 points
98 views
0 votes
1 answer

How do I initialize an array in a struct

You need to manually change the length ...READ MORE

answered Oct 1, 2018 in Blockchain by Perry
• 17,010 points
30 views