Describe the enhancement
I want to create a transaction and ensure that prevout has been confirmed onchain.
Similar to ChangeSpendPolicy I'd like to introduce a ConfirmationSpendPolicy.
This could be used to spend only Confirmed, Trusted or Any output.
The code to use it could look like the example below
wallet.create_tx()
.add_recipient(address.script_pubkey(), payment_amount)
.only_spend_confirmed_utxos()
.finalize()
Use case
When creating a transaction I want to ensure it cannot be doublespent.
If I use an unconfirmed and untrusted prevout, I cannot guarantee the transaction will not be doublespent
Additional context
Describe the enhancement
I want to create a transaction and ensure that prevout has been confirmed onchain.
Similar to
ChangeSpendPolicyI'd like to introduce aConfirmationSpendPolicy.This could be used to spend only
Confirmed,TrustedorAnyoutput.The code to use it could look like the example below
Use case
When creating a transaction I want to ensure it cannot be doublespent.
If I use an unconfirmed and untrusted prevout, I cannot guarantee the transaction will not be doublespent
Additional context