Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Import inputs/outputs #21

Open
Jaqueeee opened this issue May 19, 2017 · 4 comments
Open

[feature request] Import inputs/outputs #21

Jaqueeee opened this issue May 19, 2017 · 4 comments

Comments

@Jaqueeee
Copy link
Contributor

Hi. I'm currently working on light wallet support in official cli and gui wallets.

When switching between different openmonero/mymonero instances you need to do a full rescan (which sometimes requires a fee). Would it be possible to add an import endpoint to api?

This would make it easier to switch between full and light wallet mode. Let's say you have a full wallet on your desktop that you would like to convert to a light wallet that runs on your phone.

@moneroexamples
Copy link
Owner

Hi

In general, full rescan is not needed, as most users dont have two 2.5 year wallets. So I was thinking to add scanning blockchain from different point times without any fee. For example, import a wallet created withing last week or a month.

But in general importing and exporting outputs is very good idea. Do you have any specific api structure in mind?

I think that for online wallets, it would be easier to export and import, e.g., json files with outputs between wallets. For example, one web wallet could expose to a user json data obtained using get_unspent_outs or get_address_info, or something similar, which he could copy and paste into a second wallet to be imported there.

Exporting simplewallet into mymonero or openmonero could be straight forward, as a reader of output files exported from a simplewallet has already been developed: http://139.162.32.245:8081/rawoutputkeys. So this code could further be extended and adapted for the online wallets.

@Jaqueeee
Copy link
Contributor Author

Hi,

Sounds good. For simplewallet/gui it would be great if it's compatible with the format of simplewallet's export_outputs(). (https://github.com/monero-project/monero/blob/master/src/simplewallet/simplewallet.cpp#L4070)

@moneroexamples
Copy link
Owner

Importing output files/data from simplewallet to open monero can be done in a similar way to the onion explorer, which already can read and decode the output files. But this would only work with hot simplewallets, those that have key images. View only wallets dont have key images.

In general I think having monero gui or simplewallet produce data in json would be more beneficial. It would allow for easier use of the outputs data with other tools, development of new tools, allow for users to inspect the files, and eliminate problem of binary incompatibilities between different OSs and formats of the output files.

But anyway, importing of the current output file data can be done, but first have to do a number of other things for the open monero and the onion explorer which have been already planned, such as importing wallets from last week or month in open monero, and making importing fee optional and refactoring it.

@moneroexamples
Copy link
Owner

moneroexamples commented Jul 10, 2017

Hi

Time based imports have been added (http://i.imgur.com/9vF4IIi.png) and made available for testing on testnet http://139.162.32.245:81. There is default mnemonic account set with some testnet xmr, so you can login to it if you want.

Now I will be refactoring full blockchain imports, as I'm removing legacy address+payment id system, and am replacing it with integrated address. I already changed it for receiving xmr (https://i.imgur.com/VxWN7T8.png) which is also available in testing. So to make this for importing wallets by scanning entire blockchain, I will probably break mymonero compatibility in this area, as mymonero is still using old address+payment_id system, instead of integrated address.

After that most likely will look into importing output files generated by monero command line wallet, which will require new api on the backend to read the uploaded binary files with the outputs and update mysql. Just need to figure out if angularjs and restbed will not cause any issue with uploading and receiving binary files, as this development is dependent on how well these to frameworks handle file uploads.

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

No branches or pull requests

2 participants