Skip to content

Commit 51a9f0b

Browse files
committed
taprpc: support custom lock ID and expiration in CommitVirtualPsbts
This change extends the CommitVirtualPsbts RPC to accept an optional custom UTXO lock ID and lease expiration. By enabling callers to define these parameters explicitly, the wallet can better coordinate UTXO locking across concurrent workflows and provide safer, more flexible transaction retargeting when using virtual PSBTs. If unset, the default internal lock ID and 10-minute expiration remain in effect, preserving backward compatibility.
1 parent 89a3e17 commit 51a9f0b

File tree

4 files changed

+271
-217
lines changed

4 files changed

+271
-217
lines changed

rpcserver.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -2532,8 +2532,10 @@ func (r *rpcServer) CommitVirtualPsbts(ctx context.Context,
25322532
Template: &walletrpc.FundPsbtRequest_CoinSelect{
25332533
CoinSelect: coinSelect,
25342534
},
2535-
MinConfs: 1,
2536-
ChangeType: P2TRChangeType,
2535+
MinConfs: 1,
2536+
ChangeType: P2TRChangeType,
2537+
CustomLockId: req.CustomLockId,
2538+
LockExpirationSeconds: req.LockExpirationSeconds,
25372539
}
25382540

25392541
// Unfortunately we can't use the same RPC types, so we have to do a

0 commit comments

Comments
 (0)