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

SelectWalletFrom should have a collateral field to allow consuming it #19

Open
joacohoyos opened this issue Dec 26, 2023 · 1 comment
Open

Comments

@joacohoyos
Copy link
Contributor

When using selectWalletFrom, besides setting teh utxos you should be able to set the collateral, that way you can enforce the users/wallet collateral lock and avoid consuming that utxo.

Otherwise, you could potentially get collateral issues when excluding this utxos as the rest of the utxos might be to big/small and

@micahkendall
Copy link
Member

Yeah we can generally make selection of utxos more programmable. We could consider "Wallet UTxOs" as utxos available for balancing or spending, then "Available UTxOs" as utxos brought into context by the wallet as a provider but not actually selected to be spent (but can be manually spent). I already have to do something along these lines for the ExUnits calculations to track which UTxOs might be in the transaction. We could achieve similar goals to this PR to lucid spacebudz/lucid#231 at the same time, maybe in a more elegant fashion. In practice this api might look like: lucid.useWallet(new CustomWallet(cip30api, {collateralUTxO})), and during tx completion stage the wallet is invoked for the purposes of deciding how to balance.

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