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

Improve transaction builder APIs around SCIs #3230

Open
cbeck88 opened this issue Mar 13, 2023 · 0 comments
Open

Improve transaction builder APIs around SCIs #3230

cbeck88 opened this issue Mar 13, 2023 · 0 comments
Assignees
Labels
! v5.0.0 Blocker for v5

Comments

@cbeck88
Copy link
Contributor

cbeck88 commented Mar 13, 2023

Maybe it makes sense to change the transaction builder api (in a separate pr)?
My thinking is that since this API is always used by the claimer of an SCI, wouldn't it make sense that they always specify how much they want to get? I think they'll always start with that so they'll end up doing this exact subtraction every time this is used.

Originally posted by @eranrund in #3214 (comment)

There are two things I want to change about the transaction builder APIs around SCIs:

  1. Instead of passing the "partial fill change value", instead pass this "partial fill value" which is intuitively what the user is trying to take from the swap, and let the supporting code calculate the change outputs under the hood.
  2. Instead of calling it "add_presigned_input" and "add_presigned_partial_fill_input", just call it "add_signed_contingent_input" and "add_partial_fill_signed_contingent_input". I don't know why I introduced a new term for this, it's needlessly confusing and I should have tried to be consistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
! v5.0.0 Blocker for v5
Projects
None yet
Development

No branches or pull requests

1 participant