Skip to content
CCPEDIAby Unity Nodes
App Development

PQS and Explicit Disclosure

5 posts216 views6 likesLast activity Jul 2025

  1. WallaceKellyOP

    Can Scribe be configured to store in the PQS the created_event_blob (which is required for Explicit Disclosure)?

  2. vladgangan 3

    One needs to use the metadata filter to indicate which templates to capture metadata for (same rules as contract filters use):

    $ 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:

    postgres=# select template_fqn, metadata from creates();
           template_fqn       | metadata
    --------------------------+----------
     daml:PingPong:Ping       | \x
     daml:PingPong:Ping       | \x
    
  3. WallaceKelly 1

    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?

  4. vladgangan 1

    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.

  5. Artur_Poor 1

    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:

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

    Tested with PostgreSQL 14.17.