Skip to content

Commit

Permalink
feat!: rename types for iota PR iotaledger/iota#3499 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored Oct 29, 2024
1 parent 46d46d6 commit 55e1086
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions crates/iota-rust-sdk/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ pub use object_id::ObjectId;
#[cfg_attr(doc_cfg, doc(cfg(feature = "serde")))]
pub(crate) use transaction::SignedTransactionWithIntentMessage;
pub use transaction::{
ActiveJwk, Argument, AuthenticatorStateExpire, AuthenticatorStateUpdate, CancelledTransaction,
ChangeEpoch, Command, ConsensusCommitPrologueV1, ConsensusDeterminedVersionAssignments,
EndOfEpochTransactionKind, GasPayment, GenesisTransaction, InputArgument, MakeMoveVector,
MergeCoins, MoveCall, ProgrammableTransaction, Publish, RandomnessStateUpdate,
SignedTransaction, SplitCoins, SystemPackage, Transaction, TransactionExpiration,
TransactionKind, TransferObjects, UnresolvedGasPayment, UnresolvedInputArgument,
UnresolvedObjectReference, UnresolvedProgrammableTransaction, UnresolvedTransaction, Upgrade,
VersionAssignment,
ActiveJwk, Argument, AuthenticatorStateExpire, AuthenticatorStateUpdateV1,
CancelledTransaction, ChangeEpoch, Command, ConsensusCommitPrologueV1,
ConsensusDeterminedVersionAssignments, EndOfEpochTransactionKind, GasPayment,
GenesisTransaction, InputArgument, MakeMoveVector, MergeCoins, MoveCall,
ProgrammableTransaction, Publish, RandomnessStateUpdate, SignedTransaction, SplitCoins,
SystemPackage, Transaction, TransactionExpiration, TransactionKind, TransferObjects,
UnresolvedGasPayment, UnresolvedInputArgument, UnresolvedObjectReference,
UnresolvedProgrammableTransaction, UnresolvedTransaction, Upgrade, VersionAssignment,
};
pub use type_tag::{Identifier, StructTag, TypeParseError, TypeTag};

Expand Down
2 changes: 1 addition & 1 deletion crates/iota-rust-sdk/src/types/serialization_proptests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ serialization_test!(ObjectId);
serialization_test!(ActiveJwk);
serialization_test!(Argument);
serialization_test!(AuthenticatorStateExpire);
serialization_test!(AuthenticatorStateUpdate);
serialization_test!(AuthenticatorStateUpdateV1);
serialization_test!(ChangeEpoch);
serialization_test!(Command);
serialization_test!(ConsensusCommitPrologueV1);
Expand Down
8 changes: 4 additions & 4 deletions crates/iota-rust-sdk/src/types/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub enum TransactionKind {
/// only signs internally during epoch changes.
Genesis(GenesisTransaction),
ConsensusCommitPrologueV1(ConsensusCommitPrologueV1),
AuthenticatorStateUpdate(AuthenticatorStateUpdate),
AuthenticatorStateUpdateV1(AuthenticatorStateUpdateV1),

/// EndOfEpochTransaction replaces ChangeEpoch with a list of transactions
/// that are allowed to run at the end of the epoch.
Expand Down Expand Up @@ -169,7 +169,7 @@ pub struct AuthenticatorStateExpire {
)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[cfg_attr(test, derive(test_strategy::Arbitrary))]
pub struct AuthenticatorStateUpdate {
pub struct AuthenticatorStateUpdateV1 {
/// Epoch of the authenticator state update transaction
#[cfg_attr(feature = "serde", serde(with = "crate::_serde::ReadableDisplay"))]
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
Expand All @@ -184,8 +184,8 @@ pub struct AuthenticatorStateUpdate {
#[cfg_attr(feature = "serde", serde(with = "crate::_serde::ReadableDisplay"))]
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
pub authenticator_obj_initial_shared_version: u64,
// to version this struct, do not add new fields. Instead, add a AuthenticatorStateUpdateV2 to
// TransactionKind.
// to version this struct, do not add new fields. Instead, add a AuthenticatorStateUpdateV2
// to TransactionKind.
}

#[derive(Clone, Debug, PartialEq, Eq)]
Expand Down
26 changes: 13 additions & 13 deletions crates/iota-rust-sdk/src/types/transaction/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ mod transaction {
mod transaction_kind {
use super::*;
use crate::types::transaction::{
AuthenticatorStateUpdate, ConsensusCommitPrologueV1, EndOfEpochTransactionKind,
AuthenticatorStateUpdateV1, ConsensusCommitPrologueV1, EndOfEpochTransactionKind,
GenesisTransaction, ProgrammableTransaction, RandomnessStateUpdate, TransactionKind,
};

Expand All @@ -134,7 +134,7 @@ mod transaction_kind {
ProgrammableTransaction(&'a ProgrammableTransaction),
Genesis(&'a GenesisTransaction),
ConsensusCommitPrologueV1(&'a ConsensusCommitPrologueV1),
AuthenticatorStateUpdate(&'a AuthenticatorStateUpdate),
AuthenticatorStateUpdateV1(&'a AuthenticatorStateUpdateV1),
EndOfEpoch {
commands: &'a Vec<EndOfEpochTransactionKind>,
},
Expand All @@ -149,7 +149,7 @@ mod transaction_kind {
ProgrammableTransaction(ProgrammableTransaction),
Genesis(GenesisTransaction),
ConsensusCommitPrologueV1(ConsensusCommitPrologueV1),
AuthenticatorStateUpdate(AuthenticatorStateUpdate),
AuthenticatorStateUpdateV1(AuthenticatorStateUpdateV1),
EndOfEpoch {
commands: Vec<EndOfEpochTransactionKind>,
},
Expand All @@ -172,7 +172,7 @@ mod transaction_kind {
ProgrammableTransaction(&'a ProgrammableTransaction),
Genesis(&'a GenesisTransaction),
ConsensusCommitPrologueV1(&'a ConsensusCommitPrologueV1),
AuthenticatorStateUpdate(&'a AuthenticatorStateUpdate),
AuthenticatorStateUpdateV1(&'a AuthenticatorStateUpdateV1),
EndOfEpoch(&'a Vec<EndOfEpochTransactionKind>),
RandomnessStateUpdate(&'a RandomnessStateUpdate),
}
Expand All @@ -181,7 +181,7 @@ mod transaction_kind {
ProgrammableTransaction(ProgrammableTransaction),
Genesis(GenesisTransaction),
ConsensusCommitPrologueV1(ConsensusCommitPrologueV1),
AuthenticatorStateUpdate(AuthenticatorStateUpdate),
AuthenticatorStateUpdateV1(AuthenticatorStateUpdateV1),
EndOfEpoch(Vec<EndOfEpochTransactionKind>),
RandomnessStateUpdate(RandomnessStateUpdate),
}
Expand All @@ -200,8 +200,8 @@ mod transaction_kind {
Self::ConsensusCommitPrologueV1(k) => {
ReadableTransactionKindRef::ConsensusCommitPrologueV1(k)
}
Self::AuthenticatorStateUpdate(k) => {
ReadableTransactionKindRef::AuthenticatorStateUpdate(k)
Self::AuthenticatorStateUpdateV1(k) => {
ReadableTransactionKindRef::AuthenticatorStateUpdateV1(k)
}
Self::EndOfEpoch(commands) => {
ReadableTransactionKindRef::EndOfEpoch { commands }
Expand All @@ -220,8 +220,8 @@ mod transaction_kind {
Self::ConsensusCommitPrologueV1(k) => {
BinaryTransactionKindRef::ConsensusCommitPrologueV1(k)
}
Self::AuthenticatorStateUpdate(k) => {
BinaryTransactionKindRef::AuthenticatorStateUpdate(k)
Self::AuthenticatorStateUpdateV1(k) => {
BinaryTransactionKindRef::AuthenticatorStateUpdateV1(k)
}
Self::EndOfEpoch(k) => BinaryTransactionKindRef::EndOfEpoch(k),
Self::RandomnessStateUpdate(k) => {
Expand All @@ -247,8 +247,8 @@ mod transaction_kind {
ReadableTransactionKind::ConsensusCommitPrologueV1(k) => {
Self::ConsensusCommitPrologueV1(k)
}
ReadableTransactionKind::AuthenticatorStateUpdate(k) => {
Self::AuthenticatorStateUpdate(k)
ReadableTransactionKind::AuthenticatorStateUpdateV1(k) => {
Self::AuthenticatorStateUpdateV1(k)
}
ReadableTransactionKind::EndOfEpoch { commands } => Self::EndOfEpoch(commands),
ReadableTransactionKind::RandomnessStateUpdate(k) => {
Expand All @@ -264,8 +264,8 @@ mod transaction_kind {
BinaryTransactionKind::ConsensusCommitPrologueV1(k) => {
Self::ConsensusCommitPrologueV1(k)
}
BinaryTransactionKind::AuthenticatorStateUpdate(k) => {
Self::AuthenticatorStateUpdate(k)
BinaryTransactionKind::AuthenticatorStateUpdateV1(k) => {
Self::AuthenticatorStateUpdateV1(k)
}
BinaryTransactionKind::EndOfEpoch(k) => Self::EndOfEpoch(k),
BinaryTransactionKind::RandomnessStateUpdate(k) => {
Expand Down

0 comments on commit 55e1086

Please sign in to comment.