From ede81225aec813acb1061c76ffbb2fcc6b07fea3 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Fri, 13 Sep 2024 13:22:24 -0600 Subject: [PATCH 1/2] update package --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a874b2a3..4d3d866a 100644 --- a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/xmtp/libxmtp-swift.git", "state" : { - "revision" : "06e890646a32c3ae9b9ac78150a7ec4971e54c9d", - "version" : "0.5.8-beta3" + "revision" : "abd4f896f539e5bb090c85022177d775ad08dcb1", + "version" : "0.5.8-beta4" } }, { From 74903c36d48eba7ffdda3002e16b3007079590fe Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Fri, 22 Nov 2024 11:35:44 -0800 Subject: [PATCH 2/2] update to 1 signature version --- Package.swift | 2 +- Sources/XMTPiOS/Client.swift | 8 ++------ Tests/XMTPTests/ClientTests.swift | 12 ++++-------- XMTP.podspec | 2 +- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Package.swift b/Package.swift index 4513363a..6216537f 100644 --- a/Package.swift +++ b/Package.swift @@ -20,7 +20,7 @@ let package = Package( .package(url: "https://github.com/tesseract-one/CSecp256k1.swift.git", from: "0.2.0"), .package(url: "https://github.com/bufbuild/connect-swift", exact: "1.0.0"), .package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.4.3"), - .package(url: "https://github.com/xmtp/libxmtp-swift.git", exact: "3.0.5"), + .package(url: "https://github.com/xmtp/libxmtp-swift.git", exact: "3.0.7"), .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", exact: "1.8.3") ], targets: [ diff --git a/Sources/XMTPiOS/Client.swift b/Sources/XMTPiOS/Client.swift index 3fac8c1b..97f9c46e 100644 --- a/Sources/XMTPiOS/Client.swift +++ b/Sources/XMTPiOS/Client.swift @@ -292,15 +292,11 @@ public final class Client { self.environment = environment } - public func addAccount(recoveryAccount: SigningKey, newAccount: SigningKey) + public func addAccount(newAccount: SigningKey) async throws { - let signatureRequest = try await ffiClient.addWallet( - existingWalletAddress: recoveryAccount.address.lowercased(), - newWalletAddress: newAccount.address.lowercased()) + let signatureRequest = try await ffiClient.addWallet(newWalletAddress: newAccount.address.lowercased()) do { - try await Client.handleSignature( - for: signatureRequest, signingKey: recoveryAccount) try await Client.handleSignature( for: signatureRequest, signingKey: newAccount) try await ffiClient.applySignatureRequest( diff --git a/Tests/XMTPTests/ClientTests.swift b/Tests/XMTPTests/ClientTests.swift index fa292697..3d3442df 100644 --- a/Tests/XMTPTests/ClientTests.swift +++ b/Tests/XMTPTests/ClientTests.swift @@ -332,10 +332,8 @@ class ClientTests: XCTestCase { let alix2Wallet = try PrivateKey.generate() let alix3Wallet = try PrivateKey.generate() - try await fixtures.alixClient.addAccount( - recoveryAccount: fixtures.alix, newAccount: alix2Wallet) - try await fixtures.alixClient.addAccount( - recoveryAccount: fixtures.alix, newAccount: alix3Wallet) + try await fixtures.alixClient.addAccount(newAccount: alix2Wallet) + try await fixtures.alixClient.addAccount(newAccount: alix3Wallet) let state = try await fixtures.alixClient.inboxState( refreshFromNetwork: true) @@ -359,10 +357,8 @@ class ClientTests: XCTestCase { let alix2Wallet = try PrivateKey.generate() let alix3Wallet = try PrivateKey.generate() - try await fixtures.alixClient.addAccount( - recoveryAccount: fixtures.alix, newAccount: alix2Wallet) - try await fixtures.alixClient.addAccount( - recoveryAccount: fixtures.alix, newAccount: alix3Wallet) + try await fixtures.alixClient.addAccount(newAccount: alix2Wallet) + try await fixtures.alixClient.addAccount(newAccount: alix3Wallet) var state = try await fixtures.alixClient.inboxState( refreshFromNetwork: true) diff --git a/XMTP.podspec b/XMTP.podspec index b1c63778..48efd7d1 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |spec| spec.dependency 'CSecp256k1', '~> 0.2' spec.dependency "Connect-Swift", "= 1.0.0" - spec.dependency 'LibXMTP', '= 3.0.5' + spec.dependency 'LibXMTP', '= 3.0.7' spec.dependency 'CryptoSwift', '= 1.8.3' spec.ios.deployment_target = '14.0' diff --git a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 14a2f437..82187ce3 100644 --- a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/xmtp/libxmtp-swift.git", "state" : { - "revision" : "77fd4bb5a04281b30e887dcc8739497acaa7a3a6", - "version" : "3.0.5" + "revision" : "74733290efe7f6d13c40b7ed41ec4cd4e5d95da3", + "version" : "3.0.7" } }, {