Skip to content

Commit

Permalink
Merge pull request #9 from xmtp/np/bump-libxmtp-version
Browse files Browse the repository at this point in the history
Update to latest
  • Loading branch information
nplasterer authored Feb 13, 2024
2 parents 82398e4 + 32da493 commit d2d0312
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions LibXMTP.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'LibXMTP'
s.version = '0.4.1-beta2'
s.version = '0.4.1-beta3'
s.summary = 'XMTP shared Rust code that powers cross-platform SDKs'

s.homepage = 'https://github.com/xmtp/libxmtp-swift'
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios, '13.0', :macos, '11.0'
s.swift_version = '5.3'

s.source = { :http => "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-43bc889/LibXMTPSwiftFFI.zip", :type => :zip }
s.source = { :http => "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-8c182f5/LibXMTPSwiftFFI.zip", :type => :zip }
s.vendored_frameworks = 'LibXMTPRust.xcframework'
s.source_files = 'Sources/LibXMTP/**/*'
end
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ let package = Package(
),
.binaryTarget(
name: "LibXMTPSwiftFFI",
url: "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-43bc889/LibXMTPSwiftFFI.zip",
checksum: "dbe55c7011a88603063f0a9d86783a168678b9cb06c877e47813355cc9a81a1f"
url: "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-8c182f5/LibXMTPSwiftFFI.zip",
checksum: "7f553e4e3b8b2881f7e8623ac49c00d8e260df7f376a04b1f321a8872af24eff"
),
.testTarget(name: "LibXMTPTests", dependencies: ["LibXMTP"]),
]
Expand Down
23 changes: 23 additions & 0 deletions Sources/LibXMTP/xmtpv3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ public protocol FfiGroupProtocol {
func createdAtNs() -> Int64
func findMessages(opts: FfiListMessagesOptions) throws -> [FfiMessage]
func id() -> Data
func isActive() throws -> Bool
func listMembers() throws -> [FfiGroupMember]
func removeMembers(accountAddresses: [String]) async throws
func send(contentBytes: Data) async throws
Expand Down Expand Up @@ -616,6 +617,14 @@ public class FfiGroup: FfiGroupProtocol {
)
}

public func isActive() throws -> Bool {
return try FfiConverterBool.lift(
rustCallWithError(FfiConverterTypeGenericError.lift) {
uniffi_xmtpv3_fn_method_ffigroup_is_active(self.pointer, $0)
}
)
}

public func listMembers() throws -> [FfiGroupMember] {
return try FfiConverterSequenceTypeFfiGroupMember.lift(
rustCallWithError(FfiConverterTypeGenericError.lift) {
Expand Down Expand Up @@ -3019,6 +3028,14 @@ public func generatePrivatePreferencesTopicIdentifier(privateKey: Data) throws -
)
}

public func getVersionInfo() -> String {
return try! FfiConverterString.lift(
try! rustCall {
uniffi_xmtpv3_fn_func_get_version_info($0)
}
)
}

public func keccak256(input: Data) -> Data {
return try! FfiConverterData.lift(
try! rustCall {
Expand Down Expand Up @@ -3147,6 +3164,9 @@ private var initializationResult: InitializationResult {
if uniffi_xmtpv3_checksum_func_generate_private_preferences_topic_identifier() != 5952 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_func_get_version_info() != 3533 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_func_keccak256() != 17749 {
return InitializationResult.apiChecksumMismatch
}
Expand Down Expand Up @@ -3198,6 +3218,9 @@ private var initializationResult: InitializationResult {
if uniffi_xmtpv3_checksum_method_ffigroup_id() != 35243 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_method_ffigroup_is_active() != 27808 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_method_ffigroup_list_members() != 15786 {
return InitializationResult.apiChecksumMismatch
}
Expand Down

0 comments on commit d2d0312

Please sign in to comment.