Skip to content

feat: TransactionKind improvements#1130

Merged
thibault-martinez merged 7 commits into
developfrom
sdk-replacement/27-TransactionKind
May 8, 2026
Merged

feat: TransactionKind improvements#1130
thibault-martinez merged 7 commits into
developfrom
sdk-replacement/27-TransactionKind

Conversation

@Alex6323
Copy link
Copy Markdown
Contributor

@Alex6323 Alex6323 commented May 7, 2026

Summary

Updates TransactionKind to align with the monorepo replacement, adding ergonomic APIs and trait derives without changing the wire format.

  • Renames the ProgrammableTransaction variant to Programmable. The serialized name is preserved via serde(rename = "TransactionKind") and the existing ProgrammableTransaction tag, so BCS and JSON output are unchanged.
  • Derives Hash and adds a Display impl on both TransactionKind and ProgrammableTransaction; FFI exposes Hash and Display via uniffi::export.
  • Adds constructor helpers (new_programmable, new_genesis, new_consensus_commit_prologue_v1, new_end_of_epoch, new_randomness_state_update) and convenience methods (is_system, num_commands, num_transactions).
  • Regenerates C#, Go, Kotlin, Python, and Swift bindings to match the renamed variant/constructors.
  • Fixes crates/iota-sdk/examples/package_inspect.rs to use the renamed accessor as_programmable_opt.

@Alex6323 Alex6323 force-pushed the sdk-replacement/27-TransactionKind branch from 917944d to 563bf68 Compare May 7, 2026 14:52
@Alex6323 Alex6323 marked this pull request as ready for review May 8, 2026 07:00
@Alex6323 Alex6323 requested a review from a team as a code owner May 8, 2026 07:00
Alex6323 added 2 commits May 8, 2026 09:01
* derive Hash

* add Display

* expose Hash and Display

* add ctors

* update bindings

* move 2 more methods

* one more method

* serde rename

* remove leftover

* fix docs

* hopefully fix Go CI
@Alex6323 Alex6323 force-pushed the sdk-replacement/27-TransactionKind branch from 563bf68 to 7f105fc Compare May 8, 2026 07:02
Comment thread crates/iota-sdk-ffi/src/types/transaction/mod.rs Outdated
Comment thread crates/iota-sdk/examples/polling-indexer/src/indexer.rs Outdated
Comment thread crates/iota-sdk-ffi/src/types/transaction/mod.rs Outdated
Comment thread crates/iota-sdk-types/src/transaction/mod.rs
@thibault-martinez thibault-martinez merged commit 87e28c8 into develop May 8, 2026
20 checks passed
@thibault-martinez thibault-martinez deleted the sdk-replacement/27-TransactionKind branch May 8, 2026 11:33
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.

4 participants