Skip to content

Commit

Permalink
fix: expose Node transactions
Browse files Browse the repository at this point in the history
Signed-off-by: Ricky Saechao <[email protected]>
  • Loading branch information
RickyLB committed Nov 26, 2024
1 parent 57109d8 commit cdef0fa
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 10 deletions.
15 changes: 9 additions & 6 deletions src/address_book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
* ‍
*/

mod node_create_transaction;
mod node_delete_transaction;
mod node_update_transaction;
pub mod node_create_transaction;
pub mod node_delete_transaction;
pub mod node_update_transaction;

pub use node_create_transaction::NodeCreateTransactionData;
pub use node_delete_transaction::NodeDeleteTransactionData;
pub use node_update_transaction::NodeUpdateTransactionData;
pub use node_create_transaction::NodeCreateTransaction;
pub(crate) use node_create_transaction::NodeCreateTransactionData;
pub use node_delete_transaction::NodeDeleteTransaction;
pub(crate) use node_delete_transaction::NodeDeleteTransactionData;
pub use node_update_transaction::NodeUpdateTransaction;
pub(crate) use node_update_transaction::NodeUpdateTransactionData;
3 changes: 2 additions & 1 deletion src/address_book/node_create_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ‌
* Hedera Rust SDK
* ​
* Copyright (C) 2022 - 2023 Hedera Hashgraph, LLC
* Copyright (C) 2022 - 2024 Hedera Hashgraph, LLC
* ​
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,6 +54,7 @@ use crate::{
/// to join the network, and requires governing council authorization.
pub type NodeCreateTransaction = Transaction<NodeCreateTransactionData>;

/// A transaction body to add a new consensus node to the network address book.
#[derive(Debug, Clone, Default)]
pub struct NodeCreateTransactionData {
/// A Node account identifier.
Expand Down
3 changes: 2 additions & 1 deletion src/address_book/node_delete_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ‌
* Hedera Rust SDK
* ​
* Copyright (C) 2022 - 2023 Hedera Hashgraph, LLC
* Copyright (C) 2022 - 2024 Hedera Hashgraph, LLC
* ​
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,6 +58,7 @@ use crate::{
/// receipt.
pub type NodeDeleteTransaction = Transaction<NodeDeleteTransactionData>;

/// A transaction body to delete a node from the network address book.
#[derive(Debug, Clone, Default)]
pub struct NodeDeleteTransactionData {
/// A consensus node identifier in the network state.
Expand Down
3 changes: 2 additions & 1 deletion src/address_book/node_update_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ‌
* Hedera Rust SDK
* ​
* Copyright (C) 2022 - 2023 Hedera Hashgraph, LLC
* Copyright (C) 2022 - 2024 Hedera Hashgraph, LLC
* ​
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,6 +65,7 @@ use crate::{
/// transaction receipt.
pub type NodeUpdateTransaction = Transaction<NodeUpdateTransactionData>;

/// Transaction body to modify address book node attributes.
#[derive(Debug, Clone, Default)]
pub struct NodeUpdateTransactionData {
/// A consensus node identifier in the network state.
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ pub use account::{
AllProxyStakers,
ProxyStaker,
};
pub use address_book::{
NodeCreateTransaction,
NodeDeleteTransaction,
NodeUpdateTransaction,
};
pub use client::Client;
pub(crate) use client::Operator;
pub use contract::{
Expand Down Expand Up @@ -293,6 +298,7 @@ pub use schedule::{
ScheduleSignTransaction,
};
pub use semantic_version::SemanticVersion;
pub use service_endpoint::ServiceEndpoint;
pub use staking_info::StakingInfo;
pub use system::{
FreezeTransaction,
Expand Down
2 changes: 1 addition & 1 deletion src/service_endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ‌
* Hedera Rust SDK
* ​
* Copyright (C) 2022 - 2023 Hedera Hashgraph, LLC
* Copyright (C) 2022 - 2024 Hedera Hashgraph, LLC
* ​
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/address_book/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod node_create;
1 change: 1 addition & 0 deletions tests/e2e/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod account;
mod address_book;
mod common;
mod contract;
mod ethereum_transaction;
Expand Down

0 comments on commit cdef0fa

Please sign in to comment.