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

Suggested API update #41

Open
Quantumplation opened this issue Mar 2, 2024 · 1 comment
Open

Suggested API update #41

Quantumplation opened this issue Mar 2, 2024 · 1 comment

Comments

@Quantumplation
Copy link

Given recent issues, I'd like to propose updating the surface API of translucent to prevent accidental mistakes.

Currently, payToContract prevents sending to a smart contract if no datum is attached.

This is super useful to prevent accidental mistakes, but occasionally people will accidentally use the payToAddressWithData method instead, which bypasses this check.

If we made this method private, and added payToNativeScriptWithData and payToWalletAddressWithData that, respectively, required you to pass the native address and required you to pass a non-script address, this could solve some accidental use of the library.

@micahkendall
Copy link
Member

Makes sense but generally we're keeping the lucid apis for compatibility, with intent to move away entirely at some point. Later variations can have such considerations.

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