diff --git a/lib/aiken-content-ownership/common.ak b/lib/aiken-content-ownership/common.ak
index 42b6db7..bd8e1a6 100644
--- a/lib/aiken-content-ownership/common.ak
+++ b/lib/aiken-content-ownership/common.ak
@@ -40,6 +40,22 @@ pub fn inputs_at_with(
)
}
+pub fn inputs_at_with_policy(
+ inputs: List,
+ address: Address,
+ policy: PolicyId,
+) -> List {
+ list.filter(
+ inputs,
+ fn(input) {
+ input.output.address == address && list.any(
+ flatten(input.output.value),
+ fn(token) { token.1st == policy },
+ )
+ },
+ )
+}
+
pub fn outputs_at(outputs: List