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

Unlock tokens before melting to avoid an extra swap #164

Open
gudnuf opened this issue Aug 1, 2024 · 0 comments
Open

Unlock tokens before melting to avoid an extra swap #164

gudnuf opened this issue Aug 1, 2024 · 0 comments

Comments

@gudnuf
Copy link
Collaborator

gudnuf commented Aug 1, 2024

Currently, meltTokens does not support passing in a locked token along with a privkey to unlock it.

When claiming a locked token from an untrusted mint, for example, I have to do something like:

const unlockedProofs = await wallet.receiveTokenEntry(
         {
            lockedProofs,
            mint: wallet.mint.mintUrl,
         },
         { privkey },
);

wallet.meltTokens(meltQuote, unlockedProofs)

Is there a reason that meltTokens does not directly support melting tokens?

It would be nice to simply pass a privkey opt to meltTokens, and have a signature be produced rather than having to do a swap before being able to melt.

@gudnuf gudnuf changed the title Unlock tokens before melting Unlock tokens before melting to avoid an extra swap Aug 1, 2024
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

1 participant