Skip to content

Commit cf2d178

Browse files
authored
docs: Add documentation comments (#585)
* Add documentation comments to TransactionHash.swift Signed-off-by: freya-docs <freya.docs.pp@gmail.com> * Update TransactionHash.swift Signed-off-by: freya-docs <freya.docs.pp@gmail.com> * Add documentation comments to TransactionHash.swift Signed-off-by: freya-docs <freya.docs.pp@gmail.com> * Update comments in TransactionHash.swift Signed-off-by: freya-docs <freya.docs.pp@gmail.com> * Update TransactionHash.swift Signed-off-by: freya-docs <freya.docs.pp@gmail.com> --------- Signed-off-by: freya-docs <freya.docs.pp@gmail.com>
1 parent 0bb6ac1 commit cf2d178

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Hiero/Transaction/TransactionHash.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
import Foundation
44

5+
/// The SHA-384 hash of a transaction, used to uniquely identify transactions on the network.
56
public struct TransactionHash: CustomStringConvertible {
7+
/// Creates a transaction hash by computing SHA-384 of the given data.
68
internal init(hashing data: Data) {
79
self.data = Sha2.sha384(data)
810
}
911

12+
/// The raw bytes of the SHA-384 hash.
1013
public let data: Data
1114

15+
/// Returns the hash as a hex-encoded string.
1216
public var description: String {
1317
data.hexStringEncoded()
1418
}

0 commit comments

Comments
 (0)