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

Remove [create|sign|send]transaction interface #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkauffman1
Copy link
Contributor

Remove [create|sign|send]transaction. There preferred interface for
creating and sending transactions is now the tx command.

@jkauffman1 jkauffman1 force-pushed the remove-createtransaction branch from a128097 to 7a4eee3 Compare November 18, 2021 13:44
Remove [create|sign|send]transaction. There preferred interface for
creating and sending transactions is now the `tx` command.
@jkauffman1 jkauffman1 force-pushed the remove-createtransaction branch from 7a4eee3 to 3f33483 Compare November 18, 2021 14:02
@jgriffiths
Copy link
Contributor

I think I'd prefer to keep these interfaces for non-interactive use, although to reduce any maintenance overhead to zero, just have them take a json file/stdin only and return it, i.e. just pass through directly to the underlying gdk calls and resolve them.

The tx command seems much more suited for interactive use; although you can script its subcommands in a more granular/verbose way, they are stateful. My use case is that when prototyping/developing new gdk features, I want to be able to quickly hack my json input and call these one liners (possibly under gdb if I'm debugging a new/changed implementation), I don't want to mentally keep track of what the current tx or its state is, and I don't want to have to expose new features through the tx command while prototyping them, since the impl may completely change forcing me to update the tx command instead of exposing it once when my underlying work is complete.

If we are concerned about end user confusion I would be happy if these are hidden behind --expert, what do you think?

@jkauffman1
Copy link
Contributor Author

I think I'd prefer to keep these interfaces for non-interactive use, although to reduce any maintenance overhead to zero, just have them take a json file/stdin only and return it, i.e. just pass through directly to the underlying gdk calls and resolve them.

Yes I'm happy with that idea - it reduces those calls to trivial wrappers exposing the underlying gdk calls.

The tx command seems much more suited for interactive use; although you can script its subcommands in a more granular/verbose way, they are stateful. My use case is that when prototyping/developing new gdk features, I want to be able to quickly hack my json input and call these one liners (possibly under gdb if I'm debugging a new/changed implementation), I don't want to mentally keep track of what the current tx or its state is, and I don't want to have to expose new features through the tx command while prototyping them, since the impl may completely change forcing me to update the tx command instead of exposing it once when my underlying work is complete.

With the tx command you can still hack at the json as it's always backed on file somewhere and also supports tx dump and tx load if you want to avoid knowing where the file is. The idea of the tx commands is to provide convenient shortcuts to manipulating the json by hand, while still fully supporting manual editing.

If we are concerned about end user confusion I would be happy if these are hidden behind --expert, what do you think?

Yes may be a good idea - or make it --expert for mainnets (like wallet creation currently is). If we did that it would also make sense to put the same guard on tx load and tx dump.

Copy link

@SSGoku369 SSGoku369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@SSGoku369
Copy link

?

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

Successfully merging this pull request may close these issues.

3 participants