Skip to content

Deprecate check_payment alias in v2 monitor #1660

Closed as duplicate
Closed as duplicate

Description

@bnKabeer

Which crate is this feature request for?

payjoin

Please describe the feature you'd like to see added.

The v2 monitor API is named check_payment, but it is really checking for the payjoin proposal or fallback transaction appearing on the network. That wording is misleading, especially since payment is a different concept from broadcast or settlement. This should be renamed to detect_session_transaction, and the old name should be kept as a deprecated alias until the next major release if possible.

Is your feature related to a problem, if so please describe it.

The current name suggests generic payment detection, but the implementation is actually watching for transaction broadcast/confirmation state for either the payjoin proposal or fallback transaction. The terminology is inconsistent with the rest of the crate and with the distinction between payment and settlement.

Describe the solution you'd like

Rename the method to detect_session_transaction and keep a deprecated check_payment alias for compatibility while the crate is still pre-1.0. Update the FFI wrapper and docs to use the new name everywhere.

Describe any alternatives you've considered

Other names that fit the behavior better include check_for_counterparty_broadcast, watch_for_transaction, or detect_payjoin_transaction. The main goal is to avoid the ambiguous word "payment" for this network-state check.

Please leave any additional context

No response

Activity

  1. DanGould commented on Jun 19, 2026

    @DanGould
    Member

    The name you came up with is suitable 🙏

    a comment on the original issue is ok. No need to do any deprecation semantics for this Pr, we're still pre 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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