You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encountering a Spending policy required: External error when attempting to build a transaction using a multi-sig descriptor. Currently, bdk-ffi does not provide a policy_path() in txBuilder, which is necessary for specifying the correct policy path during transaction creation.
Proposed Solution:
Expose policies() from the wallet to retrieve available spending policies.
Add support for policy_path() in txBuilder to allow specifying the correct policy path when building the transaction.
These changes will ensure that the correct branch of a script is selected when creating transactions, preventing ambiguity issues.
Use Case:
An example where the policy_path is needed is with the following descriptor:
wsh(thresh(2,pk(A),sj:and_v(v:pk(B),n:older(6)),snj:and_v(v:pk(C),after(630000)))),
which is derived from the miniscript policy:
thresh(2,pk(A),and(pk(B),older(6)),and(pk(C),after(630000))).
In this case, the script can be satisfied in multiple ways. Without specifying the policy_path, it becomes ambiguous which spending path should be used for the transaction, leading to the error.
The text was updated successfully, but these errors were encountered:
Describe the bug
Encountering a
Spending policy required: External
error when attempting to build a transaction using a multi-sig descriptor. Currently, bdk-ffi does not provide apolicy_path()
intxBuilder
, which is necessary for specifying the correct policy path during transaction creation.Proposed Solution:
policies()
from the wallet to retrieve available spending policies.policy_path()
intxBuilder
to allow specifying the correct policy path when building the transaction.These changes will ensure that the correct branch of a script is selected when creating transactions, preventing ambiguity issues.
Use Case:
An example where the
policy_path
is needed is with the following descriptor:wsh(thresh(2,pk(A),sj:and_v(v:pk(B),n:older(6)),snj:and_v(v:pk(C),after(630000))))
,which is derived from the miniscript policy:
thresh(2,pk(A),and(pk(B),older(6))
,and(pk(C),after(630000)))
.In this case, the script can be satisfied in multiple ways. Without specifying the
policy_path
, it becomes ambiguous which spending path should be used for the transaction, leading to the error.The text was updated successfully, but these errors were encountered: