Is there a way to access the parties that have visibility of a contract in PQS?

Looking at the template tables I do not see an easy way to filter who can have visibility of a contract in PQS.

Of course you could create custom logic per template on your backend working with the fields in the payload however it would be far easier to have a witness column that creates a generic way to filter for contract visibility. Or am I missing something?

2 Likes

Answer:

The _creates table in PQS has a witness field for every created contract.

Using an SQL WHERE EXISTS clause you can filter the template tables for visibility of a party provided they are a witness of that contract_id in the _creates table.

4 Likes