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

Replace XMTPRust dependency with libxmtp #167

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 0 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@
"revision" : "2d9d2188a08eef4a869d368daab21b3c08510991",
"version" : "2.6.1"
}
},
{
"identity" : "xmtp-rust-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/xmtp/xmtp-rust-swift",
"state" : {
"revision" : "4a76e5401fa780c40610e2f0d248f695261d08dd",
"version" : "0.3.1-beta0"
}
}
],
"version" : 2
Expand Down
2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ let package = Package(
.package(url: "https://github.com/1024jp/GzipSwift", from: "5.2.0"),
.package(url: "https://github.com/bufbuild/connect-swift", from: "0.3.0"),
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"),
.package(url: "https://github.com/xmtp/xmtp-rust-swift", from: "0.3.1-beta0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand All @@ -38,7 +37,6 @@ let package = Package(
"web3.swift",
.product(name: "Gzip", package: "GzipSwift"),
.product(name: "Connect", package: "connect-swift"),
.product(name: "XMTPRust", package: "xmtp-rust-swift"),
]
),
.target(
Expand Down
2 changes: 0 additions & 2 deletions Sources/XMTP/ApiClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//

import Foundation
import XMTPRust
import XMTPRustSwift

public typealias PublishRequest = Xmtp_MessageApi_V1_PublishRequest
public typealias PublishResponse = Xmtp_MessageApi_V1_PublishResponse
Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import Foundation
import web3
import XMTPRust

public enum ClientError: Error {
case creationError(String)
Expand Down
5 changes: 0 additions & 5 deletions Sources/XMTP/Extensions/Data.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
//

import Foundation
import XMTPRust

extension Data {
init?(base64String: String) {
self.init(base64Encoded: Data(base64String.utf8))
}

init(_ rustVec: RustVec<UInt8>) {
self.init(rustVec.map { $0 })
}

var toHex: String {
return reduce("") { $0 + String(format: "%02x", $1) }
}
Expand Down
19 changes: 0 additions & 19 deletions Sources/XMTP/Extensions/RustVec.swift

This file was deleted.

1 change: 0 additions & 1 deletion Sources/XMTP/KeyUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Foundation
import Logging
import secp256k1
import web3
import XMTPRust

enum KeyUtilError: Error {
case invalidContext
Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/Messages/ContactBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import web3
import XMTPRust

typealias ContactBundle = Xmtp_MessageContents_ContactBundle
typealias ContactBundleV1 = Xmtp_MessageContents_ContactBundleV1
Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/Messages/MessageV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import CryptoKit
import Foundation
import XMTPRust

typealias MessageV2 = Xmtp_MessageContents_MessageV2

Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/Messages/PrivateKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import XMTPRust
import CryptoKit

/// Represents a secp256k1 private key. ``PrivateKey`` conforms to ``SigningKey`` so you can use it
Expand Down
2 changes: 0 additions & 2 deletions Sources/XMTP/Messages/PrivateKeyBundleV1.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import CryptoKit
import Foundation
import XMTPRust


public typealias PrivateKeyBundleV1 = Xmtp_MessageContents_PrivateKeyBundleV1

Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/Messages/PrivateKeyBundleV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import XMTPRust

public typealias PrivateKeyBundleV2 = Xmtp_MessageContents_PrivateKeyBundleV2

Expand Down
2 changes: 0 additions & 2 deletions Sources/XMTP/Messages/PublicKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//

import Foundation

import XMTPRust
import web3
import CryptoKit

Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/Messages/Signature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import XMTPRust

/// Represents a secp256k1 compact recoverable signature.
public typealias Signature = Xmtp_MessageContents_Signature
Expand Down
2 changes: 0 additions & 2 deletions Sources/XMTP/Messages/SignedPublicKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import CryptoKit
import Foundation

import XMTPRust
import web3

typealias SignedPublicKey = Xmtp_MessageContents_SignedPublicKey
Expand Down
1 change: 0 additions & 1 deletion Sources/XMTP/SigningKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import Foundation
import web3
import XMTPRust

/// Defines a type that is used by a ``Client`` to sign keys and messages.
///
Expand Down
1 change: 0 additions & 1 deletion Sources/XMTPTestHelpers/TestHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import Combine
import XCTest
@testable import XMTP
import XMTPRust

public struct TestConfig {
static let TEST_SERVER_ENABLED = _env("TEST_SERVER_ENABLED") == "true"
Expand Down
1 change: 0 additions & 1 deletion Tests/XMTPTests/ClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation

import XCTest
@testable import XMTP
import XMTPRust
import XMTPTestHelpers

@available(iOS 15, *)
Expand Down
2 changes: 0 additions & 2 deletions Tests/XMTPTests/IntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import Foundation
import secp256k1
import web3
import XCTest
import XMTPRust
@testable import XMTP
import XMTPRust
import XMTPTestHelpers

@available(macOS 13.0, *)
Expand Down
1 change: 0 additions & 1 deletion Tests/XMTPTests/MessageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import CryptoKit
import XCTest
import XMTPRust
@testable import XMTP
import XMTPTestHelpers

Expand Down
1 change: 0 additions & 1 deletion Tests/XMTPTests/PaginationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation

import XCTest
@testable import XMTP
import XMTPRust
import XMTPTestHelpers

@available(iOS 15, *)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,6 @@
"revision" : "2d9d2188a08eef4a869d368daab21b3c08510991",
"version" : "2.6.1"
}
},
{
"identity" : "xmtp-rust-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/xmtp/xmtp-rust-swift",
"state" : {
"revision" : "4a76e5401fa780c40610e2f0d248f695261d08dd",
"version" : "0.3.1-beta0"
}
}
],
"version" : 2
Expand Down
1 change: 0 additions & 1 deletion dev/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: "3.8"
services:
wakunode:
image: xmtp/node-go
platform: linux/arm64
environment:
- GOWAKU-NODEKEY=8a30dcb604b0b53627a5adc054dbf434b446628d4bd1eccc681d223f0550ce67
command:
Expand Down