File tree Expand file tree Collapse file tree
Sources/ATCommonTools/TypeScript-bound Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,35 +110,6 @@ public enum IPLD {
110110 return try await CID ( version: . v1, data: remainingData)
111111 }
112112
113- // public static func verifyCIDTransformStream(
114- // input: AsyncStream<Data>,
115- // expectedCID: CID
116- // ) -> AsyncThrowingStream<Data, Error> {
117- // var hasher = SHA256()
118- //
119- // return AsyncThrowingStream { continuation in
120- // do {
121- // for try await chunk in input {
122- // hasher.update(data: chunk)
123- // continuation.yield(chunk)
124- // }
125- //
126- // let digest = hasher.finalize()
127- // let actualCID = try await CID(version: .v1, data: Data(digest))
128- //
129- // guard actualCID == expectedCID else {
130- // throw CIDError.invalidCID(
131- // message: "The provided CID does not match the data. Expected: \(expectedCID), Actual: \(actualCID)."
132- // )
133- // }
134- //
135- // continuation.finish()
136- // } catch {
137- // continuation.finish(throwing: error)
138- // }
139- // }
140- // }
141-
142113 /// Returns a validated stream of `Data` chunks, ensuring the final stream contents match the given CID.
143114 ///
144115 /// - Parameters:
You can’t perform that action at this time.
0 commit comments