Skip to content

feat(iota-types)!: replace ProgrammableTransaction#11433

Merged
Thoralf-M merged 2 commits intodevelopfrom
sdk-replacement/23-ProgrammableTransaction
May 7, 2026
Merged

feat(iota-types)!: replace ProgrammableTransaction#11433
Thoralf-M merged 2 commits intodevelopfrom
sdk-replacement/23-ProgrammableTransaction

Conversation

@Thoralf-M
Copy link
Copy Markdown
Member

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 consumers
and the node should live in iota-rust-sdk and be imported from there, instead
of being defined twice (once in iota-types, once in the SDK).

This PR replaces ProgrammableTransaction (previously defined in
iota-types::transaction) with the SDK version from iota-sdk-types. To keep
the diff small and avoid touching every call site, the SDK type is re-exported
from iota-types::transaction under the original name ProgrammableTransaction,
so most existing imports continue to work unchanged.

Description of change

  • iota-types::transaction::ProgrammableTransaction is now a re-export of
    iota_sdk_types::ProgrammableTransaction; the local
    ProgrammableTransaction { 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 in
    iota-rust-sdk#996),
    so it matches the local definition exactly.
  • Because inherent impls and Display cannot 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 the Display impl have moved
    into a new extension trait ProgrammableTransactionExt in
    iota-types::transaction. Display is replaced by an
    fmt_display(&mut dyn Write) method on the trait, called from the
    Display impl on TransactionKind. Call sites that use these methods
    now bring ProgrammableTransactionExt into scope (updated in
    iota-transaction-builder and iota-transaction-checks).
  • The iota_sdk_types_conversions.rs round-trip for
    TransactionKind::ProgrammableTransaction no longer rebuilds the value
    field-by-field — iota-types::transaction::ProgrammableTransaction and
    iota_sdk_types::ProgrammableTransaction are now the same type, so the
    conversion is an identity passthrough (analogous to MoveObject /
    MoveStruct after
    #10795).
  • MoveCallExt::input_objects is simplified slightly to read fields off
    self directly instead of destructuring.
  • iota-sdk-types rev bumped to edf0c1fe… in the workspace Cargo.toml,
    docs/examples/rust/Cargo.toml, and examples/tic-tac-toe/cli/Cargo.toml.

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK: iota-types::transaction::ProgrammableTransaction is now a
    re-export of iota_sdk_types::ProgrammableTransaction. Methods that
    previously 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 new
    ProgrammableTransactionExt trait in iota-types::transaction; the
    Display impl is replaced by ProgrammableTransactionExt::fmt_display.
    Call sites need to import ProgrammableTransactionExt to use these
    methods.
  • gRPC:

@Thoralf-M Thoralf-M requested review from a team as code owners May 6, 2026 07:07
@iota-ci iota-ci added dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group. labels May 6, 2026
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/22-MoveObject branch from d464de1 to 2a4f488 Compare May 6, 2026 07:40
@thibault-martinez thibault-martinez requested review from a team and alexsporn as code owners May 6, 2026 07:40
@Thoralf-M Thoralf-M force-pushed the sdk-replacement/23-ProgrammableTransaction branch from 670767f to 596da13 Compare May 6, 2026 08:02
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/22-MoveObject branch 3 times, most recently from 3967d64 to 50a41a3 Compare May 6, 2026 15:41
@Thoralf-M Thoralf-M force-pushed the sdk-replacement/23-ProgrammableTransaction branch from 596da13 to 336a322 Compare May 6, 2026 18:17
Comment thread crates/iota-types/src/transaction.rs Outdated
Comment thread crates/iota-types/src/transaction.rs Outdated
Base automatically changed from sdk-replacement/22-MoveObject to develop May 7, 2026 07:03
@Thoralf-M Thoralf-M force-pushed the sdk-replacement/23-ProgrammableTransaction branch from 336a322 to 4dd7220 Compare May 7, 2026 07:24
@Thoralf-M Thoralf-M merged commit f114bdb into develop May 7, 2026
35 checks passed
@Thoralf-M Thoralf-M deleted the sdk-replacement/23-ProgrammableTransaction branch May 7, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants