0xPolygonMiden / miden-client

Client library that facilitates interaction with the Miden rollup
MIT License
25 stars 22 forks source link

feat: export notes from output notes table (converted to input notes) #318

Closed mFragaBA closed 1 month ago

mFragaBA commented 2 months ago

closes #304

This actually takes care of two things:

mFragaBA commented 2 months ago

I resolved the conflict by keeping the new and the old test, though perhaps the old one isn't too relevant anymore

mFragaBA commented 2 months ago

While testing the command I found a problem in the user workflow. I created a mint note with an external untracked account as a target, but I can't export it as I don't have a way to list all output note IDs. Maybe we should add a way to list output notes.

Edit: on a second thought, perhaps it's better to include the list output notes change here so we merge a complete feature

That was going to be a part of #322 , although I could provide some temporary list_output_notes here so it's possible to test all flows. Another way of testing this in the meantime would be to query the output notes table using the sqlite3 command

tomyrd commented 2 months ago

Edit: on a second thought, perhaps it's better to include the list output notes change here so we merge a complete feature

That was going to be a part of #322 , although I could provide some temporary list_output_notes here so it's possible to test all flows. Another way of testing this in the meantime would be to query the output notes table using the sqlite3 command

While working on #322 I added something that could help. The tx new command now prints the IDs of the output notes it created. That covers the case for when the user wants to export it immediately but if the terminal output is lost (like if the user closes the terminal) then we have the same problem.

mFragaBA commented 2 months ago

I've just pushed an alternative implementation where we just list/show output notes after input notes: https://github.com/0xPolygonMiden/miden-client/compare/mFragaBA-export-output-notes-alt?expand=1