Skip to content

Revisiting UTXOs to be locked #937

Closed

Description

@arminsabouri

I noticed a couple interesting things about a method on the receiver payjoin proposal typestate utxos_to_be_locked() and wanted to note them somewhere before I forget.

self.payjoin_psbt.unsigned_tx.input.iter().map(|input| &input.previous_output)

  1. This method returns both the sender and reciever outpoints. As an application I would have to first check if I "own" said outpoint then freeze or lock it. Receiver contributed inputs are now a field of the typestate. Introduce in Input weight prediction for P2WSH inputs #659 . We can simply leverage receiver_inputs instead of the unsigned tx which includes outpoints that you may not "own".
  2. Should locking utxos be a typestate? If one accidentally spends a utxo used in a payjoin proposal then the payjoin would certainly have to fallback. At the same time many wallets don't have a functionality to lock utxos. I'll leave this as an open question. If It was a typestate then we should introduce a new method to the session persister trait lock_utxos(&self, Iterator<Item = bitcoin::Outpoint>).

Activity

  1. Naomi-Gift commented on Jun 16, 2026

    @Naomi-Gift

    @arminsabouri First-time contributor here
    I'd be happy to work on this issue.

  2. DanGould commented on Oct 6, 2026

    @DanGould
    Member

    utxos_to_be_locked was removed in b87e5ae

    The UTXOs needed to be locked can be found during input/output provisioning without a payjoin-specific API handle. locking is a wallet matter rather than payjoin state, and perhaps wallet utxo locking is prerequisite to payjoin support.

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