Skip to content

Suggested API update #41

@Quantumplation

Description

@Quantumplation

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions