Skip to content

Support for decoding TX auxiliary data #1086

@agaffney

Description

@agaffney

There are different possible auxiliary data formats for different eras, and we need to be able to support them all in later eras. We'll also need a common interface type for querying data from it no matter the format.

From the Conway CDDL:

auxiliary_data = 
  shelley_auxiliary_data/ shelley_ma_auxiliary_data/ alonzo_auxiliary_data

shelley_auxiliary_data = metadata

metadata = {* transaction_metadatum_label => transaction_metadatum}

transaction_metadatum_label = uint .size 8

transaction_metadatum = 
  {* transaction_metadatum => transaction_metadatum}
  / [* transaction_metadatum]
  / int                          
  / bytes .size (0 .. 64)     
  / text .size (0 .. 64)      

shelley_ma_auxiliary_data = 
  [transaction_metadata : metadata, auxiliary_scripts : [* native_script]]

alonzo_auxiliary_data = 
  #6.259(
    { ? 0 : metadata                
    , ? 1 : [* native_script]   
    , ? 2 : [* plutus_v1_script]
    , ? 3 : [* plutus_v2_script]
    , ? 4 : [* plutus_v3_script]
    }

  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions