feat(iota-types)!: replace ProgrammableTransaction#11433
Merged
Conversation
DaughterOfMars
approved these changes
May 6, 2026
d464de1 to
2a4f488
Compare
670767f to
596da13
Compare
piotrm50
approved these changes
May 6, 2026
DaughterOfMars
approved these changes
May 6, 2026
semenov-vladyslav
approved these changes
May 6, 2026
kodemartin
approved these changes
May 6, 2026
valeriyr
approved these changes
May 6, 2026
Alex6323
approved these changes
May 6, 2026
3967d64 to
50a41a3
Compare
596da13 to
336a322
Compare
roman1e2f5p8s
approved these changes
May 6, 2026
336a322 to
4dd7220
Compare
thibault-martinez
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of the ongoing effort to consolidate blockchain types in the
canonical
iota-rust-sdk. Types that are needed by both clients/SDK consumersand the node should live in
iota-rust-sdkand be imported from there, insteadof being defined twice (once in
iota-types, once in the SDK).This PR replaces
ProgrammableTransaction(previously defined iniota-types::transaction) with the SDK version fromiota-sdk-types. To keepthe diff small and avoid touching every call site, the SDK type is re-exported
from
iota-types::transactionunder the original nameProgrammableTransaction,so most existing imports continue to work unchanged.
Description of change
iota-types::transaction::ProgrammableTransactionis now a re-export ofiota_sdk_types::ProgrammableTransaction; the localProgrammableTransaction { inputs: Vec<CallArg>, commands: Vec<Command> }struct has been removed. The SDK type has the same fields and wire format
and now also derives
Hash(added iniota-rust-sdk#996),
so it matches the local definition exactly.
Displaycannot be defined on a foreign type,the methods that lived on the local
impl ProgrammableTransaction(
input_objects,receiving_objects,validity_check,shared_input_objects,move_calls,non_system_packages_to_be_published) plus theDisplayimpl have movedinto a new extension trait
ProgrammableTransactionExtiniota-types::transaction.Displayis replaced by anfmt_display(&mut dyn Write)method on the trait, called from theDisplayimpl onTransactionKind. Call sites that use these methodsnow bring
ProgrammableTransactionExtinto scope (updated iniota-transaction-builderandiota-transaction-checks).iota_sdk_types_conversions.rsround-trip forTransactionKind::ProgrammableTransactionno longer rebuilds the valuefield-by-field —
iota-types::transaction::ProgrammableTransactionandiota_sdk_types::ProgrammableTransactionare now the same type, so theconversion is an identity passthrough (analogous to
MoveObject/MoveStructafter#10795).
MoveCallExt::input_objectsis simplified slightly to read fields offselfdirectly instead of destructuring.iota-sdk-typesrev bumped toedf0c1fe…in the workspaceCargo.toml,docs/examples/rust/Cargo.toml, andexamples/tic-tac-toe/cli/Cargo.toml.Release Notes
iota-types::transaction::ProgrammableTransactionis now are-export of
iota_sdk_types::ProgrammableTransaction. Methods thatpreviously lived on the inherent impl (
input_objects,receiving_objects,validity_check,shared_input_objects,move_calls,non_system_packages_to_be_published) have moved to a newProgrammableTransactionExttrait iniota-types::transaction; theDisplayimpl is replaced byProgrammableTransactionExt::fmt_display.Call sites need to import
ProgrammableTransactionExtto use thesemethods.