# PQS and Explicit Disclosure

**URL:** <https://forum.canton.network/t/pqs-and-explicit-disclosure/7843>\
**Category:** App Development\
**Tags:** explicit-disclosure, pqs\
**Created:** [March 27, 2025, 10:31pm UTC](https://forum.canton.network/t/pqs-and-explicit-disclosure/7843 "2025-03-27T22:31:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [March 27, 2025, 10:31pm UTC](https://forum.canton.network/t/pqs-and-explicit-disclosure/7843/1 "2025-03-27T22:31:59Z")

</div>

Can Scribe be configured to store in the PQS the `created_event_blob` (which is required for [Explicit Disclosure](https://docs.daml.com/app-dev/explicit-contract-disclosure.html#how-do-stakeholders-disclose-contracts-to-submitters))?

---

<div class="post-metadata">

**Author:** ![vladgangan](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/vladgangan/32/6991_2.png) [@vladgangan](https://forum.canton.network/u/vladgangan)\
**Post date:** [March 27, 2025, 10:56pm UTC](https://forum.canton.network/t/pqs-and-explicit-disclosure/7843/2 "2025-03-27T22:56:41Z")

</div>

One needs to use the metadata filter to indicate which templates to capture metadata for (same rules as [contract filters](https://docs.daml.com/query/pqs-user-guide.html#contract-filters) use):

```haskell
$ scribe.jar pipeline -h
...
  --pipeline-filter-metadata string Filter expression determining which templates and interfaces to capture metadata for (default: !*)

```

Captured data will be available in the `metadata` column in the query functions output:

```haskell
postgres=# select template_fqn, metadata from creates();
       template_fqn | metadata
--------------------------+----------
 daml:PingPong:Ping | \x
 daml:PingPong:Ping | \x

```

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [March 27, 2025, 11:16pm UTC](https://forum.canton.network/t/pqs-and-explicit-disclosure/7843/3 "2025-03-27T23:16:44Z")

</div>

And the full contents of the `metadata` column is what the docs call the `created_event_blob`? Or would I need to parse the `metadata` and extract the `created_event_blob`?

---

<div class="post-metadata">

**Author:** ![vladgangan](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/vladgangan/32/6991_2.png) [@vladgangan](https://forum.canton.network/u/vladgangan)\
**Post date:** [March 27, 2025, 11:38pm UTC](https://forum.canton.network/t/pqs-and-explicit-disclosure/7843/4 "2025-03-27T23:38:56Z")

</div>

This is correct - `metadata` column’s type is `bytea` (byte array) in Postgres so it’s a direct storage for `created_event_blob` contents. No need to parse it.

---

<div class="post-metadata">

**Author:** ![Artur\_Poor](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/artur_poor/32/2442_2.png) [@Artur\_Poor](https://forum.canton.network/u/Artur_Poor)\
**Post date:** [July 8, 2025, 12:08pm UTC](https://forum.canton.network/t/pqs-and-explicit-disclosure/7843/5 "2025-07-08T12:08:56Z")

</div>

As of Scribe version 0.6.3, the `metadata` column is hexadecimal-encoded binary data. I presume Canton understands base64-encoded data as `created_event_blob`. The conversion from hexadecimal format to base64 is the following:

```haskell
select encode(metadata, 'base64') from lookup_contract('001796e46284...');

```

Tested with PostgreSQL 14.17.
