pallas/pallas-txbuilder
Cobb 57b36d3a7c pallas-txbuilder: thread auxiliary_data through StagingTransaction → Conway build
addresses the four TODO comments in pallas-txbuilder/src/transaction/model.rs
and conway.rs around auxiliary_data + auxiliary_data_hash. without this the
conway builder hardcodes auxiliary_data: None, which blocks CIP-20 / CIP-25
/ CIP-68 metadata.

implementation:
- new StagingTransaction field: pub auxiliary_data: Option<Vec<u8>>.
  stored as opaque cbor bytes (caller encodes alonzo::AuxiliaryData) since
  AuxiliaryData itself doesn't impl Eq, which the rest of StagingTransaction
  requires.
- builder methods .auxiliary_data(cbor) and .clear_auxiliary_data().
- conway::build_conway_raw now decodes the bytes back into
  AuxiliaryData::decode_fragment and plugs it into pallas_tx.auxiliary_data.
  the existing auxiliary_data_hash population block is unchanged — it
  already computes the hash from pallas_tx.auxiliary_data after assignment.
- decode failures map to TxBuilderError::CorruptedTxBytes.

tests:
- auxiliary_data_round_trips_through_build: encodes a CIP-25-shaped
  metadata, attaches, builds, decodes resulting tx, asserts both
  body.auxiliary_data_hash matches expected_hash.compute_hash() and the
  aux re-encodes byte-equivalent.
- no_auxiliary_data_means_no_hash: confirms the absence path still works
  (no aux → hash field stays None).

both pre-existing tests (staging_json_roundtrip, built_json_roundtrip,
test_script_data_hash) continue to pass — the new field defaults to None
and rides alongside.

PR upstream pending; using as a vendored patch via [patch.crates-io] on
the Sulkta side until merge.
2026-05-04 12:04:11 -07:00
..
src pallas-txbuilder: thread auxiliary_data through StagingTransaction → Conway build 2026-05-04 12:04:11 -07:00
Cargo.toml Release 0.32.1 2025-06-25 10:28:02 -03:00
README.md fix: add missing READMEs for crate publish 2024-01-04 11:58:28 -03:00

Pallas TxBuilder