diff --git a/Sources/Hiero/Transaction/TransactionHash.swift b/Sources/Hiero/Transaction/TransactionHash.swift index 0f893e05..a2bdb16f 100644 --- a/Sources/Hiero/Transaction/TransactionHash.swift +++ b/Sources/Hiero/Transaction/TransactionHash.swift @@ -2,13 +2,17 @@ import Foundation +/// The SHA-384 hash of a transaction, used to uniquely identify transactions on the network. public struct TransactionHash: CustomStringConvertible { + /// Creates a transaction hash by computing SHA-384 of the given data. internal init(hashing data: Data) { self.data = Sha2.sha384(data) } + /// The raw bytes of the SHA-384 hash. public let data: Data + /// Returns the hash as a hex-encoded string. public var description: String { data.hexStringEncoded() }