Skip to content

Commit

Permalink
update the protos
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Nov 28, 2024
1 parent 4e23584 commit c819afc
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Sources/XMTPiOS/Frames/FramesClient.swift
Original file line number Diff line number Diff line change
@@ -84,6 +84,7 @@ public class FramesClient {
frameAction.actionBody = try actionBodyInputs.serializedData()
frameAction.installationSignature = signature
frameAction.installationID = self.xmtpClient.installationID.hexToData
frameAction.inboxID = self.xmtpClient.inboxID

return try frameAction.serializedData()
}
9 changes: 9 additions & 0 deletions Sources/XMTPiOS/Proto/message_contents/frames.pb.swift
Original file line number Diff line number Diff line change
@@ -106,6 +106,9 @@ public struct Xmtp_MessageContents_FrameAction: @unchecked Sendable {
/// The public installation id used to sign.
public var installationID: Data = Data()

/// The inbox id of the installation used to sign.
public var inboxID: String = String()

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}
@@ -206,6 +209,7 @@ extension Xmtp_MessageContents_FrameAction: SwiftProtobuf.Message, SwiftProtobuf
3: .standard(proto: "action_body"),
4: .standard(proto: "installation_signature"),
5: .standard(proto: "installation_id"),
6: .standard(proto: "inbox_id"),
]

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -219,6 +223,7 @@ extension Xmtp_MessageContents_FrameAction: SwiftProtobuf.Message, SwiftProtobuf
case 3: try { try decoder.decodeSingularBytesField(value: &self.actionBody) }()
case 4: try { try decoder.decodeSingularBytesField(value: &self.installationSignature) }()
case 5: try { try decoder.decodeSingularBytesField(value: &self.installationID) }()
case 6: try { try decoder.decodeSingularStringField(value: &self.inboxID) }()
default: break
}
}
@@ -244,6 +249,9 @@ extension Xmtp_MessageContents_FrameAction: SwiftProtobuf.Message, SwiftProtobuf
if !self.installationID.isEmpty {
try visitor.visitSingularBytesField(value: self.installationID, fieldNumber: 5)
}
if !self.inboxID.isEmpty {
try visitor.visitSingularStringField(value: self.inboxID, fieldNumber: 6)
}
try unknownFields.traverse(visitor: &visitor)
}

@@ -253,6 +261,7 @@ extension Xmtp_MessageContents_FrameAction: SwiftProtobuf.Message, SwiftProtobuf
if lhs.actionBody != rhs.actionBody {return false}
if lhs.installationSignature != rhs.installationSignature {return false}
if lhs.installationID != rhs.installationID {return false}
if lhs.inboxID != rhs.inboxID {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
2 changes: 1 addition & 1 deletion Tests/XMTPTests/FramesTests.swift
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import XCTest

final class FramesTests: XCTestCase {
func testInstantiateFramesClient() async throws {
let frameUrl = "https://fc-polls-five.vercel.app/polls/01032f47-e976-42ee-9e3d-3aac1324f4b8"
let frameUrl = "https://fc-polls-five.vercel.app/polls/03710836-bc1d-4921-9e24-89d82015c53b"

let key = try Crypto.secureRandomBytes(count: 32)
let bo = try PrivateKey.generate()

0 comments on commit c819afc

Please sign in to comment.