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

refactor(wallet): public submit transaction API cleanup #1085

Closed
sdbondi opened this issue Jul 19, 2024 · 1 comment
Closed

refactor(wallet): public submit transaction API cleanup #1085

sdbondi opened this issue Jul 19, 2024 · 1 comment
Assignees
Milestone

Comments

@sdbondi
Copy link
Member

sdbondi commented Jul 19, 2024

Problem

Transaction submitting API specifically needs to be cleaned up in the wallet daemon and indexer. The current API leads to confusion.

Proposal 1

Wallet Daemon

Changes here will necessitate updates to tari.js, (possibly) tari-snap, tari-generator and wallet daemon web. Hopefully no changes required for users of tari.js.

transactions.submit - remove deprecated fields and update code
transactions.submit_instructions - still needed? if so, figure out why and if we can use or modify transactions.submit in a clean way that makes sense

One of the main confusion points is the difference between inputs and filled inputs and when to use each. Maybe we should consider splitting the filling from the submitting. i.e. a wallet can look up (in it's db and/or via indexer) which inputs to include for an unsigned transaction and include them (maybe transactions.resolve_inputs). Then it can pass those inputs to transactions.submit, which simply submits the transaction as given.

Indexer

In future, we may never really want to resolve input versions. And If we know the inputs already, having the indexer scan for dependencies for every transaction is not needed and impacts performance. Therefore, I think splitting scanning/input resolving from transaction submitting makes sense.

@sdbondi sdbondi converted this from a draft issue Jul 19, 2024
@sdbondi sdbondi changed the title refactor(wallet): public API cleanup refactor(wallet): public submit transaction API cleanup Jul 19, 2024
@sdbondi sdbondi added this to the v0.0.1 milestone Sep 17, 2024
@sdbondi sdbondi self-assigned this Sep 17, 2024
@sdbondi
Copy link
Member Author

sdbondi commented Sep 19, 2024

Done in #1151

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

No branches or pull requests

1 participant