-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Babbage era CDDL specification #2654
Conversation
transaction_output = legacy_Transaction_output / post_alonzo_transaction_output ; New | ||
|
||
legacy_transaction_output = | ||
[ address | ||
, amount : value | ||
, ? datum_hash : $hash32 | ||
] | ||
|
||
; Note that in the post_alonzo_transaction_output, we do not allow | ||
; a transaction output to include both a datum hash and a datum. | ||
; In other words, keys 2 and 3 are mutually exclusive. | ||
post_alonzo_transaction_output = | ||
{ 0 => address | ||
, 1 => value | ||
, ? 2 => datum_hash | ||
, ? 3 => datum ; New; inline datum | ||
, ? 4 => script ; New; script reference | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like this 👍, how does deserializing the TxOut with cborg work though? do we decide how to branch by peekTokenType
? cborg doesn't seem to have great machinery for deserializing choices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I don't think that there is a way to handle it besides branching on peekTokenType
.
770473a
to
f825178
Compare
This is a first draft of the Babbage era CDDL specification