import Foundation

/// Read packet (0x07) — read receipt notification.
/// Field order matches TypeScript server: privateKey, fromPublicKey, toPublicKey.
struct PacketRead: Packet {
    static let packetId = 0x07

    var privateKey: String = ""
    var fromPublicKey: String = ""
    var toPublicKey: String = ""

    func write(to stream: Stream) {
        stream.writeString(privateKey)
        stream.writeString(fromPublicKey)
        stream.writeString(toPublicKey)
    }

    mutating func read(from stream: Stream) {
        privateKey = stream.readString()
        fromPublicKey = stream.readString()
        toPublicKey = stream.readString()
    }
}
