Skip to content

Add optional fields in tx output hierarchy. Add Plutus V4 fields in proto definition.#177

Merged
scarmuega merged 3 commits intoutxorpc:chore/initialize-v1betafrom
carbolymer:add-optional-fields-in-TxOutput-hierarchy
Jan 5, 2026
Merged

Add optional fields in tx output hierarchy. Add Plutus V4 fields in proto definition.#177
scarmuega merged 3 commits intoutxorpc:chore/initialize-v1betafrom
carbolymer:add-optional-fields-in-TxOutput-hierarchy

Conversation

@carbolymer
Copy link
Contributor

@carbolymer carbolymer commented Nov 17, 2025

This PR adds two changes:

  1. Marks optional fields in TxOutput types hierarchy with optional modifier. This results in cleaner code generated, for example in Haskell, where you can explicitly say that the field is not present. Note that this is not changing the wire format: https://protobuf.dev/programming-guides/proto3/#field-labels
  2. Adds Plutus V4 fields. Those fields are not in use yet in current cardano era, but they are already present in cardano-node Haskell code.

@carbolymer carbolymer force-pushed the add-optional-fields-in-TxOutput-hierarchy branch from 7102b94 to fe25af5 Compare December 23, 2025 13:47
@carbolymer carbolymer changed the base branch from main to chore/initialize-v1beta December 23, 2025 13:47
@scarmuega scarmuega merged commit 2f8b147 into utxorpc:chore/initialize-v1beta Jan 5, 2026
1 of 2 checks passed
Mercurial pushed a commit that referenced this pull request Feb 2, 2026
* chore: initialize v1beta version

* fix(cardano): Remove redundant redeemer field from Multiasset (#178)

* feat(cardano): Add `InfoAction` type representing info action governance action (#179)

* feat(cardano): Rename `NativeScript.script_pubkey` to `script_pubkey_hash` (#180)

Other fields containing hashes have `_hash` prefix. This change renames
the field to follow the suit.

* feat(cardano): Add `BootstrapWitness` and `Redeemer` fields to `WitnessSet` (#181)

* feat(cardano): simplify `Asset` type by unifying quantity fields (#182)

Since currently both of the variants of `quantity` can store negative
values, there is no point of having them both if they serve the same
purpose.

* feat(cardano): Improve optional fields and update Plutus versions (#177)

* feat(cardano): Mark optional fields in TxOutput hierarchy optional in proto definition
* feat(cardano): Add Plutus V4 fields to proto definition
* chore(cardano): Add comments to `BigInt` and `TreasuryWithdrawalsAction.withdrawals`

* chore(cardano): Add missing `;` (#185)

---------

Co-authored-by: Mateusz Galazyn <228866+carbolymer@users.noreply.github.com>
Mercurial added a commit that referenced this pull request Feb 2, 2026
* chore: initialize v1beta version

* fix(cardano): Remove redundant redeemer field from Multiasset (#178)

* feat(cardano): Add `InfoAction` type representing info action governance action (#179)

* feat(cardano): Rename `NativeScript.script_pubkey` to `script_pubkey_hash` (#180)

Other fields containing hashes have `_hash` prefix. This change renames
the field to follow the suit.

* feat(cardano): Add `BootstrapWitness` and `Redeemer` fields to `WitnessSet` (#181)

* feat(cardano): simplify `Asset` type by unifying quantity fields (#182)

Since currently both of the variants of `quantity` can store negative
values, there is no point of having them both if they serve the same
purpose.

* feat(cardano): Improve optional fields and update Plutus versions (#177)

* feat(cardano): Mark optional fields in TxOutput hierarchy optional in proto definition
* feat(cardano): Add Plutus V4 fields to proto definition
* chore(cardano): Add comments to `BigInt` and `TreasuryWithdrawalsAction.withdrawals`

* chore(cardano): Add missing `;` (#185)

* feat(v1alpha): add plutus v4 (#184)

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>

* fix(dotnet): separate codegen for v1alpha and v1beta

The C# protobuf generator outputs flat .cs files where filename = proto
filename. When both v1alpha and v1beta have the same proto files, they
collide (e.g., both generate Query.cs).

This fix:
- Adds separate buf.gen.dotnet.v1alpha.yaml and v1beta.yaml (v2 format)
- Generates to subdirectories: gen/dotnet/v1alpha/ and v1beta/
- Updates .csproj to .NET 10 and latest packages
- Updates CI workflow to run both dotnet codegen steps
- Updates .gitignore to exclude generated C# files

This matches industry standards (Google Cloud APIs, Microsoft gRPC, AIP-185).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Co-authored-by: Santiago Carmuega <santiago@carmuega.me>
Co-authored-by: Mateusz Galazyn <228866+carbolymer@users.noreply.github.com>
Co-authored-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants