Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Create Address Command #13

Open
Rovak opened this issue Jan 21, 2018 · 6 comments
Open

Create Address Command #13

Rovak opened this issue Jan 21, 2018 · 6 comments
Assignees
Milestone

Comments

@Rovak
Copy link
Collaborator

Rovak commented Jan 21, 2018

Address Creation

Add functionality to generate new addresses

CLI

The user wants to create a new address using the CLI

> key --create
Key Created!
Address: 1BUo6dhbemHJWpSXc5HkywPc3ExEBisAtb
Private Key: L4zFXjeNz8n62gE8areGTkMwCus7vQfuZnDwZkq5GChrQF4BBr74

Don't lose your private key!

Web Api

The user wants to create a new address using the Web Api

Request

POST /api/key

Response

{
  "address": "1BUo6dhbemHJWpSXc5HkywPc3ExEBisAtb",
  "private_key": "L4zFXjeNz8n62gE8areGTkMwCus7vQfuZnDwZkq5GChrQF4BBr74"
}

Usage

The address can then be used in conjunction with the send command

> wallet --key L3MNySDoLAiJU8ze3V7XZpxYKvywbNjxyAboNhsYVSnR3ZYZMahq
> send --to 1BUo6dhbemHJWpSXc5HkywPc3ExEBisAtb --amount 10

Sources:

@Rovak Rovak changed the title Create Address Command Create Wallet Command Jan 21, 2018
@vinayphadnis
Copy link
Contributor

This seems good for now.
If we want to make this further friendly for the end user, we need to add another point of return from failure (loosing private key)

For instance in:
Exodus( wallet for ethereum and some of its tokens) gives the user a list of 15 words which have to be given to the app in the same sequence in case of a loss of the private key. NEON which is a wallet for neo gives the user a *.keystore file.

What I mean from multiple points of return is something like the above mentioned examples. After the user generates a private key or a new wallet, we need to give the user also another thing (file or any cryptographic data) which will not make the user loose his/her holding in case of missing his private key.
For instance,
we can give the user a keystore file which has the key encrypted in some format in it.

If the user looses his/her private key, all he has to do is give the keystore file to the app and he will get his private key regenerated.

Note: This does not mean that the keystore option is compulsory. It can also be kept optional for the user (for instance is the user adds a flag --nokeystore then the app wont generate a keystore). I think an added 'optional' (good) feature is definitely a bonus

@Rovak
Copy link
Collaborator Author

Rovak commented Jan 21, 2018

Adding a recovery method is a good idea but i wonder how the private key be recovered from 15 words without storing the (private key, words) combination somewhere. Any idea how it works in the exodus wallet?

The keystore should optionally be generated with an extra option in the wallet command, i would suggest a --keystore <file> option

> key --create --keystore = /home/rovak/wallet.keystore`
Key Created!
Address: 1BUo6dhbemHJWpSXc5HkywPc3ExEBisAtb
Private Key: L4zFXjeNz8n62gE8areGTkMwCus7vQfuZnDwZkq5GChrQF4BBr74
Keystore: /home/rovak/wallet.keystore

@vinayphadnis
Copy link
Contributor

Exodus is a third party software so there is a high chance that they have (private key, words) somewhere stored on their server. This makes it highly centralised and also not very good on a security point of view.

The --keystore option seems good!

@Rovak Rovak self-assigned this Jan 21, 2018
@Rovak Rovak added this to the 0.1 milestone Jan 21, 2018
@vinayphadnis
Copy link
Contributor

While updating the README.md file,
1)I will add the print block sample as discussed over here
2)will add what is discussed on this issue concerning the command for creating a wallet
3)Should I add the --keystore <file> option as of now (in the README file) ?

@Rovak
Copy link
Collaborator Author

Rovak commented Jan 22, 2018

I've started point 2 in #20

@Rovak Rovak changed the title Create Wallet Command Create Address Command Jan 22, 2018
@Rovak
Copy link
Collaborator Author

Rovak commented Jan 22, 2018

I've reduced the scope of this issue from creating a wallet to creating addresses

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants