Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sender HMAC to MessageV2 #218

Merged
merged 29 commits into from
Feb 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8d3ccba
bump the proto code
nplasterer Jan 19, 2024
27cbb5a
add should push entitlement
nplasterer Jan 19, 2024
f355cc4
dump the protos one more time
nplasterer Jan 24, 2024
858cff4
update the protos again
nplasterer Jan 24, 2024
a60d655
feat: add to TextCodec & Composite
Jan 25, 2024
e269e40
feat: add HKDF key derivation and HMAC signature generation
Jan 25, 2024
b0e163d
feat: add shouldPush parameter to MessageV2.encode() and prepareMessa…
Jan 29, 2024
000f28f
feat: add shouldPush method to the remaining content codecs
Jan 29, 2024
7c1ea75
fix: tests
Jan 29, 2024
d99a1c8
fix: remove print statement in MessageTests.swift
Jan 29, 2024
0d70a8f
fix: remove commented code
Jan 30, 2024
d6981b9
feat: set for all Content Types
Jan 30, 2024
9818ee5
fix: add decoded content in prepareMessage function
Jan 30, 2024
821f77e
chore: remove unused dependencies
Jan 31, 2024
5a42744
Replace xmtp-rust-swift with libxmtp-swift (#217)
nakajima Jan 22, 2024
eddfa0e
Update for latest uniffi (#219)
nakajima Jan 22, 2024
64b6ae0
Fix example app (#220)
nakajima Jan 22, 2024
be1eea4
Access libxmtp-swift with static binaries (#225)
cameronvoell Jan 29, 2024
8ed7e47
Merge pre libxmtp into main (#223)
nplasterer Jan 31, 2024
e8800dd
Update Package.resolved with new branch and revision
Jan 31, 2024
dad85c7
Merge branch 'main' into np/ios-entitlement
nplasterer Feb 1, 2024
45bdee1
Merge branch 'np/ios-entitlement' of https://github.com/xmtp/xmtp-ios…
nplasterer Feb 1, 2024
d8cfd6a
bring back the proto work
nplasterer Feb 1, 2024
a5e00a0
remove the xmtp folder
nplasterer Feb 1, 2024
e622a5d
chore: refactor message encoding and decoding
Feb 1, 2024
8e662c7
chore: update libxmtp-swift to latest version
Feb 1, 2024
ec8192b
fix: refactor ConversationTests.swift
Feb 1, 2024
1967934
potential test
nplasterer Feb 1, 2024
c21b280
chore: update XMTP.podspec version to 0.7.9-alpha0
Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update the protos again
nplasterer committed Jan 24, 2024
commit 858cff44dc6629b4e9799be7823532fd245611f1
46 changes: 46 additions & 0 deletions Sources/XMTP/Proto/keystore_api/v1/keystore.pb.swift
Original file line number Diff line number Diff line change
@@ -1118,6 +1118,19 @@ public struct Xmtp_KeystoreApi_V1_TopicMap {
public init() {}
}

/// Used to get a mapping of conversation topics to their HMAC keys
public struct Xmtp_KeystoreApi_V1_GetConversationHmacKeysRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

public var topics: [String] = []

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}
}

/// A mapping of topics to their HMAC keys
public struct Xmtp_KeystoreApi_V1_GetConversationHmacKeysResponse {
// SwiftProtobuf.Message conformance is added in an extension below. See the
@@ -1214,6 +1227,7 @@ extension Xmtp_KeystoreApi_V1_SetRefeshJobRequest: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_SetRefreshJobResponse: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_TopicMap: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_TopicMap.TopicData: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_GetConversationHmacKeysRequest: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_GetConversationHmacKeysResponse: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_GetConversationHmacKeysResponse.HmacKeyData: @unchecked Sendable {}
extension Xmtp_KeystoreApi_V1_GetConversationHmacKeysResponse.HmacKeys: @unchecked Sendable {}
@@ -3018,6 +3032,38 @@ extension Xmtp_KeystoreApi_V1_TopicMap.TopicData: SwiftProtobuf.Message, SwiftPr
}
}

extension Xmtp_KeystoreApi_V1_GetConversationHmacKeysRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".GetConversationHmacKeysRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "topics"),
]

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeRepeatedStringField(value: &self.topics) }()
default: break
}
}
}

public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.topics.isEmpty {
try visitor.visitRepeatedStringField(value: self.topics, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}

public static func ==(lhs: Xmtp_KeystoreApi_V1_GetConversationHmacKeysRequest, rhs: Xmtp_KeystoreApi_V1_GetConversationHmacKeysRequest) -> Bool {
if lhs.topics != rhs.topics {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

extension Xmtp_KeystoreApi_V1_GetConversationHmacKeysResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".GetConversationHmacKeysResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [