diff --git a/include/TrustWalletCore/TWAnySigner.h b/include/TrustWalletCore/TWAnySigner.h index f3864bcfa83..36ac661b458 100644 --- a/include/TrustWalletCore/TWAnySigner.h +++ b/include/TrustWalletCore/TWAnySigner.h @@ -22,6 +22,9 @@ struct TWAnySigner; /// \return The serialized data of a `SigningOutput` proto object. (e.g. TW.Bitcoin.Proto.SigningOutput). extern TWData *_Nonnull TWAnySignerSign(TWData *_Nonnull input, enum TWCoinType coin); +// TANGEM +extern TWData *_Nonnull TWAnySignerSignExternally(TWData *_Nonnull input, enum TWCoinType coin, TWData *_Nonnull publicKey, TWData *_Nonnull (*_Nonnull externalSigner)(TWData *_Nonnull)); + /// Signs a transaction specified by the JSON representation of signing input, coin type and a private key, returning the JSON representation of the signing output. /// /// \param json JSON representation of a signing input diff --git a/src/Coin.cpp b/src/Coin.cpp index 521db9fb0a8..a2a69a9f9c4 100644 --- a/src/Coin.cpp +++ b/src/Coin.cpp @@ -264,6 +264,13 @@ void TW::anyCoinSign(TWCoinType coinType, const Data& dataIn, Data& dataOut) { dispatcher->sign(coinType, dataIn, dataOut); } +// TANGEM +void TW::anyCoinSignExternally(TWCoinType coinType, const Data& dataIn, Data& dataOut, const Data& publicKey, std::function externalSigner) { + auto* dispatcher = coinDispatcher(coinType); + assert(dispatcher != nullptr); + dispatcher->signExternally(coinType, dataIn, dataOut, publicKey, externalSigner); +} + std::string TW::anySignJSON(TWCoinType coinType, const std::string& json, const Data& key) { auto* dispatcher = coinDispatcher(coinType); assert(dispatcher != nullptr); diff --git a/src/Coin.h b/src/Coin.h index a4920fe7419..5836f5e1376 100644 --- a/src/Coin.h +++ b/src/Coin.h @@ -114,6 +114,9 @@ const char* chainId(TWCoinType coin); // Note: use output parameter to avoid unneeded copies void anyCoinSign(TWCoinType coinType, const Data& dataIn, Data& dataOut); +// TANGEM +void anyCoinSignExternally(TWCoinType coinType, const Data& dataIn, Data& dataOut, const Data& publicKey, const std::function externalSigner); + uint32_t slip44Id(TWCoinType coin); std::string anySignJSON(TWCoinType coinType, const std::string& json, const Data& key); diff --git a/src/CoinEntry.h b/src/CoinEntry.h index 5ecb055ddc6..0fa6522621f 100644 --- a/src/CoinEntry.h +++ b/src/CoinEntry.h @@ -49,6 +49,8 @@ class CoinEntry { virtual Data addressToData([[maybe_unused]] TWCoinType coin, [[maybe_unused]] const std::string& address) const { return {}; } // Signing virtual void sign(TWCoinType coin, const Data& dataIn, Data& dataOut) const = 0; + // TANGEM + virtual void signExternally(TWCoinType coin, const Data& dataIn, Data& dataOut, const Data& publicKey, std::function externalSigner) const { } virtual bool supportsJSONSigning() const { return false; } // It is optional, Signing JSON input with private key virtual std::string signJSON([[maybe_unused]] TWCoinType coin, [[maybe_unused]] const std::string& json, [[maybe_unused]] const Data& key) const { return ""; } @@ -79,6 +81,15 @@ void signTemplate(const Data& dataIn, Data& dataOut) { dataOut.insert(dataOut.end(), serializedOut.begin(), serializedOut.end()); } +// TANGEM +template +void signTemplateExternally(const Data& dataIn, Data& dataOut, const Data& publicKey, const std::function externalSigner) { + auto input = Input(); + input.ParseFromArray(dataIn.data(), (int)dataIn.size()); + auto serializedOut = Signer::sign(input, publicKey, externalSigner).SerializeAsString(); + dataOut.insert(dataOut.end(), serializedOut.begin(), serializedOut.end()); +} + // Note: use output parameter to avoid unneeded copies template void planTemplate(const Data& dataIn, Data& dataOut) { diff --git a/src/TheOpenNetwork/Entry.cpp b/src/TheOpenNetwork/Entry.cpp index 21f2e19de1b..53562de7606 100644 --- a/src/TheOpenNetwork/Entry.cpp +++ b/src/TheOpenNetwork/Entry.cpp @@ -30,4 +30,9 @@ void Entry::sign([[maybe_unused]] TWCoinType coin, const TW::Data& dataIn, TW::D signTemplate(dataIn, dataOut); } +// TANGEM +void Entry::signExternally([[maybe_unused]] TWCoinType coin, const TW::Data& dataIn, TW::Data& dataOut, const Data& publicKey, const std::function externalSigner) const { + signTemplateExternally(dataIn, dataOut, publicKey, externalSigner); +} + } // namespace TW::TheOpenNetwork diff --git a/src/TheOpenNetwork/Entry.h b/src/TheOpenNetwork/Entry.h index a432b493bda..e226df52924 100644 --- a/src/TheOpenNetwork/Entry.h +++ b/src/TheOpenNetwork/Entry.h @@ -16,6 +16,8 @@ class Entry final : public CoinEntry { std::string normalizeAddress(TWCoinType coin, const std::string& address) const; std::string deriveAddress(TWCoinType coin, const PublicKey& publicKey, TWDerivation derivation, const PrefixVariant& addressPrefix) const; void sign(TWCoinType coin, const Data& dataIn, Data& dataOut) const; + // TANGEM + void signExternally(TWCoinType coin, const Data& dataIn, Data& dataOut, const Data& publicKey, const std::function externalSigner) const; }; } // namespace TW::TheOpenNetwork diff --git a/src/TheOpenNetwork/Signer.cpp b/src/TheOpenNetwork/Signer.cpp index df5e6db1a27..c492c82a919 100644 --- a/src/TheOpenNetwork/Signer.cpp +++ b/src/TheOpenNetwork/Signer.cpp @@ -14,8 +14,14 @@ namespace TW::TheOpenNetwork { Data Signer::createTransferMessage(std::shared_ptr wallet, const PrivateKey& privateKey, const Proto::Transfer& transfer) { + return createTransferMessage(wallet, privateKey, transfer, nullptr); +} + +// TANGEM +Data Signer::createTransferMessage(std::shared_ptr wallet, const PrivateKey& privateKey, const Proto::Transfer& transfer, const std::function externalSigner) { const auto msg = wallet->createTransferMessage( privateKey, + externalSigner, Address(transfer.dest()), transfer.amount(), transfer.sequence_number(), @@ -32,7 +38,14 @@ Data Signer::createTransferMessage(std::shared_ptr wallet, const Private Proto::SigningOutput Signer::sign(const Proto::SigningInput &input) noexcept { const auto& privateKey = PrivateKey(input.private_key()); const auto& publicKey = privateKey.getPublicKey(TWPublicKeyTypeED25519); + return Signer::sign(input, publicKey.bytes, nullptr); +} +// TANGEM +Proto::SigningOutput Signer::sign(const Proto::SigningInput& input, const Data& publicKeyData, const std::function externalSigner) noexcept { + const auto& privateKey = PrivateKey(input.private_key()); + const PublicKey publicKey(publicKeyData, TWPublicKeyTypeED25519); + auto protoOutput = Proto::SigningOutput(); switch (input.action_oneof_case()) { @@ -44,7 +57,7 @@ Proto::SigningOutput Signer::sign(const Proto::SigningInput &input) noexcept { case Proto::WalletVersion::WALLET_V4_R2: { const int8_t workchainId = WorkchainType::Basechain; auto wallet = std::make_shared(publicKey, workchainId); - const auto& transferMessage = Signer::createTransferMessage(wallet, privateKey, transfer); + const auto& transferMessage = Signer::createTransferMessage(wallet, privateKey, transfer, externalSigner); protoOutput.set_encoded(TW::Base64::encode(transferMessage)); break; } diff --git a/src/TheOpenNetwork/Signer.h b/src/TheOpenNetwork/Signer.h index 2ca74fa7cb8..3facbc05d18 100644 --- a/src/TheOpenNetwork/Signer.h +++ b/src/TheOpenNetwork/Signer.h @@ -22,9 +22,15 @@ class Signer { /// Creates a signed transfer message static Data createTransferMessage(std::shared_ptr wallet, const PrivateKey& privateKey, const Proto::Transfer& transfer); + + // TANGEM + static Data createTransferMessage(std::shared_ptr wallet, const PrivateKey& privateKey, const Proto::Transfer& transfer, const std::function externalSigner); /// Signs a Proto::SigningInput transaction static Proto::SigningOutput sign(const Proto::SigningInput& input) noexcept; + + // TANGEM + static Proto::SigningOutput sign(const Proto::SigningInput& input, const Data& publicKey, const std::function externalSigner) noexcept; }; } // namespace TW::TheOpenNetwork diff --git a/src/TheOpenNetwork/wallet/Wallet.cpp b/src/TheOpenNetwork/wallet/Wallet.cpp index 8a381ecf8a3..04172204197 100644 --- a/src/TheOpenNetwork/wallet/Wallet.cpp +++ b/src/TheOpenNetwork/wallet/Wallet.cpp @@ -4,6 +4,8 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. +#include + #include "Wallet.h" #include "HexCoding.h" @@ -68,6 +70,29 @@ Cell::Ref Wallet::createTransferMessage( uint8_t mode, uint32_t expireAt, const std::string& comment +) const { + return createTransferMessage( + privateKey, + nullptr, + dest, + amount, + sequence_number, + mode, + expireAt, + comment + ); +} + +// TANGEM +Cell::Ref Wallet::createTransferMessage( + const PrivateKey& privateKey, + const std::function externalSigner, + const Address& dest, + uint64_t amount, + uint32_t sequence_number, + uint8_t mode, + uint32_t expireAt, + const std::string& comment ) const { const auto transferMessageHeader = std::make_shared(this->getAddress().addressData); Message transferMessage = Message(MessageData(transferMessageHeader)); @@ -80,7 +105,15 @@ Cell::Ref Wallet::createTransferMessage( CellBuilder bodyBuilder; const Cell::Ref signingMessage = this->createSigningMessage(dest, amount, sequence_number, mode, expireAt, comment); Data data(signingMessage->hash.begin(), signingMessage->hash.end()); - const auto signature = privateKey.sign(data, TWCurveED25519); + + // TANGEM + auto signature = Data(); + if(externalSigner) { + std::future signedDataFuture = std::async(externalSigner, data); + signature = signedDataFuture.get(); + } else { + signature = privateKey.sign(data, TWCurveED25519); + } bodyBuilder.appendRaw(signature, static_cast(signature.size()) * 8); bodyBuilder.appendCellSlice(CellSlice(signingMessage.get())); diff --git a/src/TheOpenNetwork/wallet/Wallet.h b/src/TheOpenNetwork/wallet/Wallet.h index 8e081363957..eb7db53de6d 100644 --- a/src/TheOpenNetwork/wallet/Wallet.h +++ b/src/TheOpenNetwork/wallet/Wallet.h @@ -39,6 +39,17 @@ class Wallet { uint32_t expireAt = 0, const std::string& comment = "" ) const; + // TANGEM + [[nodiscard]] Cell::Ref createTransferMessage( + const PrivateKey& privateKey, + const std::function externalSigner, + const Address& dest, + uint64_t amount, + uint32_t sequence_number, + uint8_t mode, + uint32_t expireAt = 0, + const std::string& comment = "" + ) const; protected: [[nodiscard]] virtual Cell::Ref createDataCell() const = 0; diff --git a/src/Tron/Entry.cpp b/src/Tron/Entry.cpp index 393c6be330d..239b431e0a4 100644 --- a/src/Tron/Entry.cpp +++ b/src/Tron/Entry.cpp @@ -26,4 +26,9 @@ void Entry::sign([[maybe_unused]] TWCoinType coin, const TW::Data& dataIn, TW::D signTemplate(dataIn, dataOut); } +// TANGEM +void Entry::signExternally([[maybe_unused]] TWCoinType coin, const TW::Data& dataIn, TW::Data& dataOut, const Data& publicKey, const std::function externalSigner) const { + signTemplateExternally(dataIn, dataOut, publicKey, externalSigner); +} + } // namespace TW::Tron diff --git a/src/Tron/Entry.h b/src/Tron/Entry.h index d689b890aa7..73a432444b4 100644 --- a/src/Tron/Entry.h +++ b/src/Tron/Entry.h @@ -17,6 +17,8 @@ class Entry final : public CoinEntry { bool validateAddress(TWCoinType coin, const std::string& address, const PrefixVariant& addressPrefix) const; std::string deriveAddress(TWCoinType coin, const PublicKey& publicKey, TWDerivation derivation, const PrefixVariant& addressPrefix) const; void sign(TWCoinType coin, const Data& dataIn, Data& dataOut) const; + // TANGEM + void signExternally(TWCoinType coin, const TW::Data& dataIn, TW::Data& dataOut, const Data& publicKey, const std::function externalSigner) const; }; } // namespace TW::Tron diff --git a/src/Tron/Signer.cpp b/src/Tron/Signer.cpp index 87ed70b30f5..35fb40404ed 100644 --- a/src/Tron/Signer.cpp +++ b/src/Tron/Signer.cpp @@ -15,6 +15,7 @@ #include #include +#include namespace TW::Tron { @@ -202,6 +203,11 @@ void setBlockReference(const Proto::Transaction& transaction, protocol::Transact } Proto::SigningOutput Signer::sign(const Proto::SigningInput& input) noexcept { + return Signer::sign(input, Data(), nullptr); +} + +// TANGEM +Proto::SigningOutput Signer::sign(const Proto::SigningInput& input, const Data& publicKey, const std::function externalSigner) noexcept { auto internal = protocol::Transaction(); auto output = Proto::SigningOutput(); @@ -310,7 +316,15 @@ Proto::SigningOutput Signer::sign(const Proto::SigningInput& input) noexcept { const auto hash = Hash::sha256(Data(serialized.begin(), serialized.end())); const auto key = PrivateKey(Data(input.private_key().begin(), input.private_key().end())); - const auto signature = key.sign(hash, TWCurveSECP256k1); + auto signature = Data(); + + // TANGEM + if(externalSigner) { + std::future signedDataFuture = std::async(externalSigner, hash); + signature = signedDataFuture.get(); + } else { + signature = key.sign(hash, TWCurveSECP256k1); + } const auto json = transactionJSON(internal, hash, signature).dump(); diff --git a/src/Tron/Signer.h b/src/Tron/Signer.h index 33a06fff775..2663c8478ca 100644 --- a/src/Tron/Signer.h +++ b/src/Tron/Signer.h @@ -19,6 +19,9 @@ class Signer { /// Signs the given transaction. static Proto::SigningOutput sign(const Proto::SigningInput& input) noexcept; + + // TANGEM + static Proto::SigningOutput sign(const Proto::SigningInput& input, const Data& publicKey, const std::function externalSigner) noexcept; }; } // namespace TW::Tron diff --git a/src/interface/TWAnySigner.cpp b/src/interface/TWAnySigner.cpp index 64f3dbcc382..3bc91549578 100644 --- a/src/interface/TWAnySigner.cpp +++ b/src/interface/TWAnySigner.cpp @@ -17,6 +17,25 @@ TWData* _Nonnull TWAnySignerSign(TWData* _Nonnull data, enum TWCoinType coin) { return TWDataCreateWithBytes(dataOut.data(), dataOut.size()); } +// TANGEM +TWData* _Nonnull TWAnySignerSignExternally(TWData* _Nonnull data, enum TWCoinType coin, TWData *_Nonnull publicKey, TWData* (*externalSigner)(TWData*)) { + // Just a conversion between TWData and TW::Data + auto dataExternalSigner = [externalSigner](Data dataToSign) -> Data { + const TWData* twDataToSign = TWDataCreateWithBytes(dataToSign.data(), dataToSign.size()); + const TWData* twDataSigned = externalSigner(twDataToSign); + + const Data& dataSigned = *(reinterpret_cast(twDataSigned)); + return dataSigned; + }; + + const Data& publicKeyData = *(reinterpret_cast(publicKey)); + + const Data& dataIn = *(reinterpret_cast(data)); + Data dataOut; + TW::anyCoinSignExternally(coin, dataIn, dataOut, publicKeyData, dataExternalSigner); + return TWDataCreateWithBytes(dataOut.data(), dataOut.size()); +} + TWString *_Nonnull TWAnySignerSignJSON(TWString *_Nonnull json, TWData *_Nonnull key, enum TWCoinType coin) { const Data& keyData = *(reinterpret_cast(key)); const std::string& jsonString = *(reinterpret_cast(json)); diff --git a/swift/Sources/AnySigner.swift b/swift/Sources/AnySigner.swift index 5abf730b95d..7ff587a807f 100644 --- a/swift/Sources/AnySigner.swift +++ b/swift/Sources/AnySigner.swift @@ -10,6 +10,46 @@ import SwiftProtobuf public typealias SigningInput = Message public typealias SigningOutput = Message +// TANGEM +public protocol Signer { + var error: Error? { get } + + var publicKey: Data { get } + + func sign(_ data: Data) -> Data + func sign(_ data: [Data]) -> [Data] +} + +// TANGEM +// For auto tests only +public struct PrivateKeySigner: Signer { + public var error: Error? + + public var publicKey: Data { + privateKey.getPublicKey(coinType: coin).data + } + + private let privateKey: PrivateKey + private let coin: CoinType + + public init(privateKey: PrivateKey, coin: CoinType) { + self.privateKey = privateKey + self.coin = coin + } + + public func sign(_ data: Data) -> Data { + return privateKey.sign(digest: data, curve: coin.curve)! + } + + public func sign(_ data: [Data]) -> [Data] { + return data.map { privateKey.sign(digest: $0, curve: coin.curve)! } + } +} + +// TANGEM +// We can't capture a local variable in a closure we're passing to std::function. Global variables are fine. +var externalSigner: Signer? = nil + /// Represents a signer to sign transactions for any blockchain. public final class AnySigner { @@ -27,6 +67,22 @@ public final class AnySigner { fatalError(error.localizedDescription) } } + + // TANGEM + public static func signExternally(input: SigningInput, coin: CoinType, signer: Signer) -> SigningOutput { + defer { + externalSigner = nil + } + + externalSigner = signer + + do { + let outputData = nativeSignExternally(data: try input.serializedData(), coin: coin, publicKey: signer.publicKey) + return try SigningOutput(serializedData: outputData) + } catch let error { + fatalError(error.localizedDescription) + } + } /// Signs a transaction by serialized data of a SigningInput and coin type /// @@ -41,6 +97,27 @@ public final class AnySigner { } return TWDataNSData(TWAnySignerSign(inputData, TWCoinType(rawValue: coin.rawValue))) } + + // TANGEM + public static func nativeSignExternally(data: Data, coin: CoinType, publicKey: Data) -> Data { + let inputData = TWDataCreateWithNSData(data) + let publicKeyData = TWDataCreateWithNSData(publicKey) + + defer { + TWDataDelete(inputData) + TWDataDelete(publicKeyData) + } + + return TWDataNSData(TWAnySignerSignExternally(inputData, TWCoinType(rawValue: coin.rawValue), publicKeyData, { twDataToSign in + guard let externalSigner = externalSigner else { + fatalError("You must set external signer to sign asynchronously") + } + + let dataToSign = TWDataNSData(twDataToSign) + let dataSigned = externalSigner.sign(dataToSign) + return TWDataCreateWithNSData(dataSigned) + })) + } /// Check if AnySigner supports signing JSON representation of SigningInput for a given coin. public static func supportsJSON(coin: CoinType) -> Bool { diff --git a/swift/Sources/Extensions/Data+Hex.swift b/swift/Sources/Extensions/Data+Hex.swift index 3888716e089..6b1bca4a175 100644 --- a/swift/Sources/Extensions/Data+Hex.swift +++ b/swift/Sources/Extensions/Data+Hex.swift @@ -8,7 +8,7 @@ import Foundation extension Data { /// Initializes `Data` with a hex string representation. - public init?(hexString: String) { + init?(hexString: String) { let string: String if hexString.hasPrefix("0x") { string = String(hexString.dropFirst(2)) @@ -58,7 +58,7 @@ extension Data { } /// Returns the hex string representation of the data. - public var hexString: String { + var hexString: String { return map({ String(format: "%02x", $0) }).joined() } } diff --git a/swift/Tests/AESTests.swift b/swift/Tests/AESTests.swift index 868300617de..5155b6bedb4 100644 --- a/swift/Tests/AESTests.swift +++ b/swift/Tests/AESTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class AESTests: XCTestCase { func testDecrypt() throws { diff --git a/swift/Tests/Addresses/BitcoinAddressTests.swift b/swift/Tests/Addresses/BitcoinAddressTests.swift index 14341165f07..64b244e9b5d 100644 --- a/swift/Tests/Addresses/BitcoinAddressTests.swift +++ b/swift/Tests/Addresses/BitcoinAddressTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class BitcoinAddressTests: XCTestCase { diff --git a/swift/Tests/Addresses/JunoAddressTests.swift b/swift/Tests/Addresses/JunoAddressTests.swift index 02935c98c3a..caf6ae246ea 100644 --- a/swift/Tests/Addresses/JunoAddressTests.swift +++ b/swift/Tests/Addresses/JunoAddressTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class JunoAddressTests: XCTestCase { diff --git a/swift/Tests/Addresses/NEOAddressTests.swift b/swift/Tests/Addresses/NEOAddressTests.swift index 35c4b2ea57b..0f285cd7325 100644 --- a/swift/Tests/Addresses/NEOAddressTests.swift +++ b/swift/Tests/Addresses/NEOAddressTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class NEOAddressTests: XCTestCase { diff --git a/swift/Tests/Addresses/OntologyAddressTests.swift b/swift/Tests/Addresses/OntologyAddressTests.swift index 616aa19e309..b6813a2b9e3 100644 --- a/swift/Tests/Addresses/OntologyAddressTests.swift +++ b/swift/Tests/Addresses/OntologyAddressTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class OntologyAddressTests: XCTestCase { diff --git a/swift/Tests/Addresses/TronAddressTests.swift b/swift/Tests/Addresses/TronAddressTests.swift index c8d875a38d0..f7c714cfb9f 100644 --- a/swift/Tests/Addresses/TronAddressTests.swift +++ b/swift/Tests/Addresses/TronAddressTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class TronAddressTests: XCTestCase { diff --git a/swift/Tests/AnyAddressTests.swift b/swift/Tests/AnyAddressTests.swift index dc4f16da527..9d4386a6e74 100644 --- a/swift/Tests/AnyAddressTests.swift +++ b/swift/Tests/AnyAddressTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AnyAddressTests: XCTestCase { diff --git a/swift/Tests/Base32Tests.swift b/swift/Tests/Base32Tests.swift index 41be00de149..db8b1aedd84 100644 --- a/swift/Tests/Base32Tests.swift +++ b/swift/Tests/Base32Tests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class Base32Tests: XCTestCase { func testEncode() { diff --git a/swift/Tests/Base64Tests.swift b/swift/Tests/Base64Tests.swift index b4fdc17c1cf..7ee2c9dfafd 100644 --- a/swift/Tests/Base64Tests.swift +++ b/swift/Tests/Base64Tests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class Base64Tests: XCTestCase { func testEncode() { diff --git a/swift/Tests/Blockchains/AeternityTests.swift b/swift/Tests/Blockchains/AeternityTests.swift index e92183f72ce..e905ad3e4e9 100644 --- a/swift/Tests/Blockchains/AeternityTests.swift +++ b/swift/Tests/Blockchains/AeternityTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AeternityTests: XCTestCase { diff --git a/swift/Tests/Blockchains/AgoricTests.swift b/swift/Tests/Blockchains/AgoricTests.swift index 19404b3447b..aaff5ab8598 100644 --- a/swift/Tests/Blockchains/AgoricTests.swift +++ b/swift/Tests/Blockchains/AgoricTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AgoricTests: XCTestCase { diff --git a/swift/Tests/Blockchains/AionTests.swift b/swift/Tests/Blockchains/AionTests.swift index c65188e041a..2564f6cf0f0 100644 --- a/swift/Tests/Blockchains/AionTests.swift +++ b/swift/Tests/Blockchains/AionTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AionTests: XCTestCase { diff --git a/swift/Tests/Blockchains/AlgorandTests.swift b/swift/Tests/Blockchains/AlgorandTests.swift index 0df5b148700..b19eaeb81be 100644 --- a/swift/Tests/Blockchains/AlgorandTests.swift +++ b/swift/Tests/Blockchains/AlgorandTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AlgorandTests: XCTestCase { diff --git a/swift/Tests/Blockchains/AptosTests.swift b/swift/Tests/Blockchains/AptosTests.swift index 66f4b33ae48..fd487cf5573 100644 --- a/swift/Tests/Blockchains/AptosTests.swift +++ b/swift/Tests/Blockchains/AptosTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AptosTests: XCTestCase { diff --git a/swift/Tests/Blockchains/AvalancheTests.swift b/swift/Tests/Blockchains/AvalancheTests.swift index 6e7b1a81c1d..9097f6a6403 100644 --- a/swift/Tests/Blockchains/AvalancheTests.swift +++ b/swift/Tests/Blockchains/AvalancheTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AvalancheTests: XCTestCase { diff --git a/swift/Tests/Blockchains/BandChainTests.swift b/swift/Tests/Blockchains/BandChainTests.swift index 03200907d37..857869bec34 100644 --- a/swift/Tests/Blockchains/BandChainTests.swift +++ b/swift/Tests/Blockchains/BandChainTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class BandChainTests: XCTestCase { diff --git a/swift/Tests/Blockchains/BinanceChainTests.swift b/swift/Tests/Blockchains/BinanceChainTests.swift index a1e0a021715..c18d56827a6 100644 --- a/swift/Tests/Blockchains/BinanceChainTests.swift +++ b/swift/Tests/Blockchains/BinanceChainTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class BinanceChainTests: XCTestCase { diff --git a/swift/Tests/Blockchains/BinanceSmartChainTests.swift b/swift/Tests/Blockchains/BinanceSmartChainTests.swift index 972c46c178e..0335c72ede9 100644 --- a/swift/Tests/Blockchains/BinanceSmartChainTests.swift +++ b/swift/Tests/Blockchains/BinanceSmartChainTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class BinanceSmartChainTests: XCTestCase { diff --git a/swift/Tests/Blockchains/BitcoinTests.swift b/swift/Tests/Blockchains/BitcoinTests.swift index 4ace92e08e5..6269fdfe667 100644 --- a/swift/Tests/Blockchains/BitcoinTests.swift +++ b/swift/Tests/Blockchains/BitcoinTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class BitcoinTransactionSignerTests: XCTestCase { override func setUp() { diff --git a/swift/Tests/Blockchains/BitconCashTests.swift b/swift/Tests/Blockchains/BitconCashTests.swift index c5cec4484d5..c288f08547a 100644 --- a/swift/Tests/Blockchains/BitconCashTests.swift +++ b/swift/Tests/Blockchains/BitconCashTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class BitcoinCashTests: XCTestCase { diff --git a/swift/Tests/Blockchains/BluzelleTests.swift b/swift/Tests/Blockchains/BluzelleTests.swift index fde2d9cc4a4..f8ebf9580e5 100644 --- a/swift/Tests/Blockchains/BluzelleTests.swift +++ b/swift/Tests/Blockchains/BluzelleTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class BluzelleAddressTests: XCTestCase { diff --git a/swift/Tests/Blockchains/CardanoTests.swift b/swift/Tests/Blockchains/CardanoTests.swift index 32561ab157d..f772f94ddbb 100644 --- a/swift/Tests/Blockchains/CardanoTests.swift +++ b/swift/Tests/Blockchains/CardanoTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class CardanoTests: XCTestCase { diff --git a/swift/Tests/Blockchains/CeloTests.swift b/swift/Tests/Blockchains/CeloTests.swift index 886490bba7c..09a6390454e 100644 --- a/swift/Tests/Blockchains/CeloTests.swift +++ b/swift/Tests/Blockchains/CeloTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class CeloTests: XCTestCase { func testTransfer() { diff --git a/swift/Tests/Blockchains/CosmosTests.swift b/swift/Tests/Blockchains/CosmosTests.swift index 3d940fe09d5..9faca5848e8 100644 --- a/swift/Tests/Blockchains/CosmosTests.swift +++ b/swift/Tests/Blockchains/CosmosTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class CosmosAddressTests: XCTestCase { func testAddressValidation() { diff --git a/swift/Tests/Blockchains/CronosTests.swift b/swift/Tests/Blockchains/CronosTests.swift index b28a89849bb..bc0475c60e9 100644 --- a/swift/Tests/Blockchains/CronosTests.swift +++ b/swift/Tests/Blockchains/CronosTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class CronosTests: XCTestCase { diff --git a/swift/Tests/Blockchains/CryptoorgTests.swift b/swift/Tests/Blockchains/CryptoorgTests.swift index 7926940b6b5..02fccdc79ff 100644 --- a/swift/Tests/Blockchains/CryptoorgTests.swift +++ b/swift/Tests/Blockchains/CryptoorgTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class CryptoorgTests: XCTestCase { diff --git a/swift/Tests/Blockchains/DashTests.swift b/swift/Tests/Blockchains/DashTests.swift index 655594b9a1c..2a913b42e1f 100644 --- a/swift/Tests/Blockchains/DashTests.swift +++ b/swift/Tests/Blockchains/DashTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class DashAddressTests: XCTestCase { diff --git a/swift/Tests/Blockchains/DecredTests.swift b/swift/Tests/Blockchains/DecredTests.swift index 2f7b3d4e54b..030b3c954bf 100644 --- a/swift/Tests/Blockchains/DecredTests.swift +++ b/swift/Tests/Blockchains/DecredTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class DecredTests: XCTestCase { diff --git a/swift/Tests/Blockchains/DogeTests.swift b/swift/Tests/Blockchains/DogeTests.swift index fd4708d10b8..372d615e355 100644 --- a/swift/Tests/Blockchains/DogeTests.swift +++ b/swift/Tests/Blockchains/DogeTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class DogeTests: XCTestCase { diff --git a/swift/Tests/Blockchains/ECashTests.swift b/swift/Tests/Blockchains/ECashTests.swift index 7826b92e44f..0ecd3b5d80d 100644 --- a/swift/Tests/Blockchains/ECashTests.swift +++ b/swift/Tests/Blockchains/ECashTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class ECashTests: XCTestCase { diff --git a/swift/Tests/Blockchains/EOSTests.swift b/swift/Tests/Blockchains/EOSTests.swift index 30ea50eda7c..64dff943f1f 100644 --- a/swift/Tests/Blockchains/EOSTests.swift +++ b/swift/Tests/Blockchains/EOSTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class EOSTests: XCTestCase { diff --git a/swift/Tests/Blockchains/ElrondTests.swift b/swift/Tests/Blockchains/ElrondTests.swift index fa6a64ee3ca..8461b0e3b61 100644 --- a/swift/Tests/Blockchains/ElrondTests.swift +++ b/swift/Tests/Blockchains/ElrondTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class ElrondTests: XCTestCase { diff --git a/swift/Tests/Blockchains/EthereumAbiTests.swift b/swift/Tests/Blockchains/EthereumAbiTests.swift index a6a18430e5b..ecbb7f90b6a 100644 --- a/swift/Tests/Blockchains/EthereumAbiTests.swift +++ b/swift/Tests/Blockchains/EthereumAbiTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class EthereumAbiTests: XCTestCase { func testAbiEncoder() { diff --git a/swift/Tests/Blockchains/EthereumTests.swift b/swift/Tests/Blockchains/EthereumTests.swift index 1409816761f..ddc45e36377 100644 --- a/swift/Tests/Blockchains/EthereumTests.swift +++ b/swift/Tests/Blockchains/EthereumTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class EthereumTests: XCTestCase { diff --git a/swift/Tests/Blockchains/EverscaleTests.swift b/swift/Tests/Blockchains/EverscaleTests.swift index d3ce3f32293..147b79506f9 100644 --- a/swift/Tests/Blockchains/EverscaleTests.swift +++ b/swift/Tests/Blockchains/EverscaleTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class EverscaleTests: XCTestCase { diff --git a/swift/Tests/Blockchains/EvmosTests.swift b/swift/Tests/Blockchains/EvmosTests.swift index ae10bdc08aa..9322fd7a806 100644 --- a/swift/Tests/Blockchains/EvmosTests.swift +++ b/swift/Tests/Blockchains/EvmosTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class EvmosTests: XCTestCase { diff --git a/swift/Tests/Blockchains/FIOTests.swift b/swift/Tests/Blockchains/FIOTests.swift index 3edbc7cd9d1..a82ba683e6a 100644 --- a/swift/Tests/Blockchains/FIOTests.swift +++ b/swift/Tests/Blockchains/FIOTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class FIOTests: XCTestCase { diff --git a/swift/Tests/Blockchains/FilecoinTests.swift b/swift/Tests/Blockchains/FilecoinTests.swift index ab5a83f6f53..d273adf29c8 100644 --- a/swift/Tests/Blockchains/FilecoinTests.swift +++ b/swift/Tests/Blockchains/FilecoinTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class FilecoinTests: XCTestCase { diff --git a/swift/Tests/Blockchains/GroestlcoinTests.swift b/swift/Tests/Blockchains/GroestlcoinTests.swift index ed0d9b250d5..7de507d482d 100644 --- a/swift/Tests/Blockchains/GroestlcoinTests.swift +++ b/swift/Tests/Blockchains/GroestlcoinTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class GroestlcoinTests: XCTestCase { diff --git a/swift/Tests/Blockchains/GroestlcoinTransactionSignerTests.swift b/swift/Tests/Blockchains/GroestlcoinTransactionSignerTests.swift index 58ab98538a9..9adbb7c3883 100644 --- a/swift/Tests/Blockchains/GroestlcoinTransactionSignerTests.swift +++ b/swift/Tests/Blockchains/GroestlcoinTransactionSignerTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class GroestlcoinTransactionSignerTests: XCTestCase { override func setUp() { diff --git a/swift/Tests/Blockchains/HarmonyTests.swift b/swift/Tests/Blockchains/HarmonyTests.swift index c74eca95520..939d1e3cce1 100644 --- a/swift/Tests/Blockchains/HarmonyTests.swift +++ b/swift/Tests/Blockchains/HarmonyTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class HarmonyTests: XCTestCase { diff --git a/swift/Tests/Blockchains/HederaTests.swift b/swift/Tests/Blockchains/HederaTests.swift index c71dd7d1f87..cd204158796 100644 --- a/swift/Tests/Blockchains/HederaTests.swift +++ b/swift/Tests/Blockchains/HederaTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class HederaTests: XCTestCase { diff --git a/swift/Tests/Blockchains/IconTests.swift b/swift/Tests/Blockchains/IconTests.swift index 4745b55be81..54ee81edb76 100644 --- a/swift/Tests/Blockchains/IconTests.swift +++ b/swift/Tests/Blockchains/IconTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class IconTests: XCTestCase { diff --git a/swift/Tests/Blockchains/IoTeXTests.swift b/swift/Tests/Blockchains/IoTeXTests.swift index 0c91d1f18f1..5d60e0348ab 100644 --- a/swift/Tests/Blockchains/IoTeXTests.swift +++ b/swift/Tests/Blockchains/IoTeXTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class IoTeXTests: XCTestCase { func testSign() { diff --git a/swift/Tests/Blockchains/KavaTests.swift b/swift/Tests/Blockchains/KavaTests.swift index f9a5f8957a5..cdecd30d0a3 100644 --- a/swift/Tests/Blockchains/KavaTests.swift +++ b/swift/Tests/Blockchains/KavaTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class KavaTests: XCTestCase { diff --git a/swift/Tests/Blockchains/KinTests.swift b/swift/Tests/Blockchains/KinTests.swift index 7dfec26b99b..6d0dfe1d5dc 100644 --- a/swift/Tests/Blockchains/KinTests.swift +++ b/swift/Tests/Blockchains/KinTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class KinTests: XCTestCase { diff --git a/swift/Tests/Blockchains/KuCoinCommunityChainTests.swift b/swift/Tests/Blockchains/KuCoinCommunityChainTests.swift index df42dfc52fb..3b53697e8f1 100644 --- a/swift/Tests/Blockchains/KuCoinCommunityChainTests.swift +++ b/swift/Tests/Blockchains/KuCoinCommunityChainTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class KuCoinCommunityChainTests: XCTestCase { diff --git a/swift/Tests/Blockchains/KusamaTests.swift b/swift/Tests/Blockchains/KusamaTests.swift index ae5fd1ea397..b9eef2eebae 100644 --- a/swift/Tests/Blockchains/KusamaTests.swift +++ b/swift/Tests/Blockchains/KusamaTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class KusamaTests: XCTestCase { diff --git a/swift/Tests/Blockchains/LitecoinTests.swift b/swift/Tests/Blockchains/LitecoinTests.swift index 01fb5b275b0..9ccea0f9335 100644 --- a/swift/Tests/Blockchains/LitecoinTests.swift +++ b/swift/Tests/Blockchains/LitecoinTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class LitecoinTests: XCTestCase { diff --git a/swift/Tests/Blockchains/MonacoinTests.swift b/swift/Tests/Blockchains/MonacoinTests.swift index e34a22a022b..198384fc29c 100644 --- a/swift/Tests/Blockchains/MonacoinTests.swift +++ b/swift/Tests/Blockchains/MonacoinTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class MonacoinTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NEARTests.swift b/swift/Tests/Blockchains/NEARTests.swift index d275f2059ec..e18cccdcc70 100644 --- a/swift/Tests/Blockchains/NEARTests.swift +++ b/swift/Tests/Blockchains/NEARTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class NEARTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NEOTests.swift b/swift/Tests/Blockchains/NEOTests.swift index 89754e3e28e..1bf5aa56898 100644 --- a/swift/Tests/Blockchains/NEOTests.swift +++ b/swift/Tests/Blockchains/NEOTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class NEOTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NULSTests.swift b/swift/Tests/Blockchains/NULSTests.swift index 3bafd7b654a..477446c7cc4 100644 --- a/swift/Tests/Blockchains/NULSTests.swift +++ b/swift/Tests/Blockchains/NULSTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class NULSTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NanoTests.swift b/swift/Tests/Blockchains/NanoTests.swift index 2e7e631c173..94a507fe0ea 100644 --- a/swift/Tests/Blockchains/NanoTests.swift +++ b/swift/Tests/Blockchains/NanoTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class NanoTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NativeInjectiveTests.swift b/swift/Tests/Blockchains/NativeInjectiveTests.swift index 6a95b53e85f..850895cd15e 100644 --- a/swift/Tests/Blockchains/NativeInjectiveTests.swift +++ b/swift/Tests/Blockchains/NativeInjectiveTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class NativeInjectiveTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NebulasTests.swift b/swift/Tests/Blockchains/NebulasTests.swift index 7cfe7e63747..747daf175c1 100644 --- a/swift/Tests/Blockchains/NebulasTests.swift +++ b/swift/Tests/Blockchains/NebulasTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class NebulasTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NervosTests.swift b/swift/Tests/Blockchains/NervosTests.swift index e250869c9ad..3c00b319656 100644 --- a/swift/Tests/Blockchains/NervosTests.swift +++ b/swift/Tests/Blockchains/NervosTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class NervosTests: XCTestCase { diff --git a/swift/Tests/Blockchains/NimiqTests.swift b/swift/Tests/Blockchains/NimiqTests.swift index d056302a5e3..6d85f2e6a3c 100644 --- a/swift/Tests/Blockchains/NimiqTests.swift +++ b/swift/Tests/Blockchains/NimiqTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class NimiqTests: XCTestCase { diff --git a/swift/Tests/Blockchains/OasisTests.swift b/swift/Tests/Blockchains/OasisTests.swift index 03ad91930f7..05cf7ecee74 100644 --- a/swift/Tests/Blockchains/OasisTests.swift +++ b/swift/Tests/Blockchains/OasisTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class OasisTests: XCTestCase { diff --git a/swift/Tests/Blockchains/OntologyTests.swift b/swift/Tests/Blockchains/OntologyTests.swift index 3779918b0f7..cdab9c60654 100644 --- a/swift/Tests/Blockchains/OntologyTests.swift +++ b/swift/Tests/Blockchains/OntologyTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class OntologyTests: XCTestCase { diff --git a/swift/Tests/Blockchains/OsmosisTests.swift b/swift/Tests/Blockchains/OsmosisTests.swift index bd7303dbe51..314d868f1ab 100644 --- a/swift/Tests/Blockchains/OsmosisTests.swift +++ b/swift/Tests/Blockchains/OsmosisTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class OsmosisTests: XCTestCase { diff --git a/swift/Tests/Blockchains/PolkadotTests.swift b/swift/Tests/Blockchains/PolkadotTests.swift index c4414e5f607..309001d6024 100644 --- a/swift/Tests/Blockchains/PolkadotTests.swift +++ b/swift/Tests/Blockchains/PolkadotTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class PolkadotTests: XCTestCase { diff --git a/swift/Tests/Blockchains/PolygonTests.swift b/swift/Tests/Blockchains/PolygonTests.swift index cba7eb17b76..373ffd86c68 100644 --- a/swift/Tests/Blockchains/PolygonTests.swift +++ b/swift/Tests/Blockchains/PolygonTests.swift @@ -3,7 +3,7 @@ // This file is part of Trust. The full Trust copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class PolygonTests: XCTestCase { diff --git a/swift/Tests/Blockchains/QtumTests.swift b/swift/Tests/Blockchains/QtumTests.swift index b6cd3394538..611ff8d2397 100644 --- a/swift/Tests/Blockchains/QtumTests.swift +++ b/swift/Tests/Blockchains/QtumTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class QtumTests: XCTestCase { diff --git a/swift/Tests/Blockchains/RippleTests.swift b/swift/Tests/Blockchains/RippleTests.swift index c2e96a65781..e51b215e1e1 100644 --- a/swift/Tests/Blockchains/RippleTests.swift +++ b/swift/Tests/Blockchains/RippleTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class RippleTests: XCTestCase { diff --git a/swift/Tests/Blockchains/RoninTests.swift b/swift/Tests/Blockchains/RoninTests.swift index 2cb54acb389..cb76b2a3362 100644 --- a/swift/Tests/Blockchains/RoninTests.swift +++ b/swift/Tests/Blockchains/RoninTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class RoninTests: XCTestCase { diff --git a/swift/Tests/Blockchains/SecretTests.swift b/swift/Tests/Blockchains/SecretTests.swift index 5abd8ff81b9..de44ddb1532 100644 --- a/swift/Tests/Blockchains/SecretTests.swift +++ b/swift/Tests/Blockchains/SecretTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class SecretTests: XCTestCase { diff --git a/swift/Tests/Blockchains/SmartBitcoinCashTests.swift b/swift/Tests/Blockchains/SmartBitcoinCashTests.swift index 48d5a6aca65..92cfe76e506 100644 --- a/swift/Tests/Blockchains/SmartBitcoinCashTests.swift +++ b/swift/Tests/Blockchains/SmartBitcoinCashTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class SmartBitcoinCashTests: XCTestCase { diff --git a/swift/Tests/Blockchains/SolanaTests.swift b/swift/Tests/Blockchains/SolanaTests.swift index a0632941a0c..5717ce9ab14 100644 --- a/swift/Tests/Blockchains/SolanaTests.swift +++ b/swift/Tests/Blockchains/SolanaTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class SolanaTests: XCTestCase { diff --git a/swift/Tests/Blockchains/StarkExTests.swift b/swift/Tests/Blockchains/StarkExTests.swift index 88e868ab10c..0ade84e2aae 100644 --- a/swift/Tests/Blockchains/StarkExTests.swift +++ b/swift/Tests/Blockchains/StarkExTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class StarkExTests: XCTestCase { func testMessageAndVerifySigner() { diff --git a/swift/Tests/Blockchains/StellarTests.swift b/swift/Tests/Blockchains/StellarTests.swift index 9ff0754b748..88522050eb4 100644 --- a/swift/Tests/Blockchains/StellarTests.swift +++ b/swift/Tests/Blockchains/StellarTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class StellarTests: XCTestCase { diff --git a/swift/Tests/Blockchains/THORChainSwapTests.swift b/swift/Tests/Blockchains/THORChainSwapTests.swift index 8a7dc4a2ff6..03a41905f48 100644 --- a/swift/Tests/Blockchains/THORChainSwapTests.swift +++ b/swift/Tests/Blockchains/THORChainSwapTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class THORSwapTests: XCTestCase { diff --git a/swift/Tests/Blockchains/THORChainTests.swift b/swift/Tests/Blockchains/THORChainTests.swift index 45d9cb3ac80..def279e678d 100644 --- a/swift/Tests/Blockchains/THORChainTests.swift +++ b/swift/Tests/Blockchains/THORChainTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class THORChainAddressTests: XCTestCase { func testAddressValidation() { diff --git a/swift/Tests/Blockchains/TerraClassicTests.swift b/swift/Tests/Blockchains/TerraClassicTests.swift index bb1e8c81e21..882e1dea4a8 100644 --- a/swift/Tests/Blockchains/TerraClassicTests.swift +++ b/swift/Tests/Blockchains/TerraClassicTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class TerraClassicTests: XCTestCase { diff --git a/swift/Tests/Blockchains/TerraTests.swift b/swift/Tests/Blockchains/TerraTests.swift index 02a264beadf..b32444992b4 100644 --- a/swift/Tests/Blockchains/TerraTests.swift +++ b/swift/Tests/Blockchains/TerraTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class TerraTests: XCTestCase { diff --git a/swift/Tests/Blockchains/TezosTests.swift b/swift/Tests/Blockchains/TezosTests.swift index 67a26a6c971..0210dbd3c19 100644 --- a/swift/Tests/Blockchains/TezosTests.swift +++ b/swift/Tests/Blockchains/TezosTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class TezosTests: XCTestCase { diff --git a/swift/Tests/Blockchains/TheOpenNetworkTests.swift b/swift/Tests/Blockchains/TheOpenNetworkTests.swift index 506d007fb9d..cdb3de4f05f 100644 --- a/swift/Tests/Blockchains/TheOpenNetworkTests.swift +++ b/swift/Tests/Blockchains/TheOpenNetworkTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class TheOpenNetworkTests: XCTestCase { @@ -47,7 +47,7 @@ class TheOpenNetworkTests: XCTestCase { $0.expireAt = 1671132440 } - let input = TheOpenNetworkSigningInput.with { + var input = TheOpenNetworkSigningInput.with { $0.transfer = transfer $0.privateKey = privateKeyData } @@ -58,5 +58,12 @@ class TheOpenNetworkTests: XCTestCase { let expectedString = "te6ccgICAAQAAQAAALAAAAFFiAGwt/q8k4SrjbFbQCjJZfQr64ExRxcUMsWqaQODqTUijgwAAQGcEUPkil2aZ4s8KKparSep/OKHMC8vuXafFbW2HGp/9AcTRv0J5T4dwyW1G0JpHw+g5Ov6QI3Xo0O9RFr3KidICimpoxdjm3UYAAAABgADAAIBYmIAM33x4uAd+uQTyXyCZPxflESlNVHpCeoOECtNsqVW9tmIUAAAAAAAAAAAAAAAAAEAAwAA" XCTAssertEqual(output.encoded, expectedString) + + // TANGEM + let signer = PrivateKeySigner(privateKey: PrivateKey(data: input.privateKey)!, coin: .ton) + input.privateKey = Data(repeating: 1, count: 32) + let outputExternal: TheOpenNetworkSigningOutput = AnySigner.signExternally(input: input, coin: .ton, signer: signer) + + XCTAssertEqual(outputExternal.encoded, expectedString) } } diff --git a/swift/Tests/Blockchains/ThetaTests.swift b/swift/Tests/Blockchains/ThetaTests.swift index 17176fdbc71..167b7d58a06 100644 --- a/swift/Tests/Blockchains/ThetaTests.swift +++ b/swift/Tests/Blockchains/ThetaTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class ThetaTests: XCTestCase { func testSigner() { diff --git a/swift/Tests/Blockchains/TronTests.swift b/swift/Tests/Blockchains/TronTests.swift index 897c9787973..a9243da7856 100644 --- a/swift/Tests/Blockchains/TronTests.swift +++ b/swift/Tests/Blockchains/TronTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class TronTests: XCTestCase { @@ -21,7 +21,7 @@ class TronTests: XCTestCase { $0.amount = 2000000 } - let input = TronSigningInput.with { + var input = TronSigningInput.with { $0.transaction = TronTransaction.with { $0.contractOneof = .transfer(contract) $0.timestamp = 1539295479000 @@ -63,5 +63,12 @@ class TronTests: XCTestCase { } """ XCTAssertJSONEqual(output.json, expectedJSON) + + // TANGEM + let signer = PrivateKeySigner(privateKey: PrivateKey(data: input.privateKey)!, coin: .tron) + input.privateKey = Data(repeating: 1, count: 32) + let outputExternal: TronSigningOutput = AnySigner.signExternally(input: input, coin: .tron, signer: signer) + + XCTAssertJSONEqual(outputExternal.json, expectedJSON) } } diff --git a/swift/Tests/Blockchains/WanchainTests.swift b/swift/Tests/Blockchains/WanchainTests.swift index 8718ce3cd9b..e9d043421f7 100644 --- a/swift/Tests/Blockchains/WanchainTests.swift +++ b/swift/Tests/Blockchains/WanchainTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class WanchainTests: XCTestCase { diff --git a/swift/Tests/Blockchains/WavesTests.swift b/swift/Tests/Blockchains/WavesTests.swift index 75c9f4b6154..6121b8289c6 100644 --- a/swift/Tests/Blockchains/WavesTests.swift +++ b/swift/Tests/Blockchains/WavesTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class WavesTests: XCTestCase { diff --git a/swift/Tests/Blockchains/ZcashTests.swift b/swift/Tests/Blockchains/ZcashTests.swift index bd7a861a0f4..a42a60f0a42 100644 --- a/swift/Tests/Blockchains/ZcashTests.swift +++ b/swift/Tests/Blockchains/ZcashTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class ZcashTests: XCTestCase { diff --git a/swift/Tests/Blockchains/ZcoinTests.swift b/swift/Tests/Blockchains/ZcoinTests.swift index 7014d4e274d..ee0d7b2abf8 100644 --- a/swift/Tests/Blockchains/ZcoinTests.swift +++ b/swift/Tests/Blockchains/ZcoinTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class ZcoinTests: XCTestCase { let coin = CoinType.firo diff --git a/swift/Tests/Blockchains/ZilliqaTests.swift b/swift/Tests/Blockchains/ZilliqaTests.swift index a523cd26c97..adbcbd94f38 100644 --- a/swift/Tests/Blockchains/ZilliqaTests.swift +++ b/swift/Tests/Blockchains/ZilliqaTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class ZilliqaTests: XCTestCase { diff --git a/swift/Tests/CoinAddressDerivationTests.swift b/swift/Tests/CoinAddressDerivationTests.swift index 1863b13d3b5..1184ca3f8eb 100644 --- a/swift/Tests/CoinAddressDerivationTests.swift +++ b/swift/Tests/CoinAddressDerivationTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class CoinAddressDerivationTests: XCTestCase { diff --git a/swift/Tests/CoinTypeTests.swift b/swift/Tests/CoinTypeTests.swift index 353b85cf729..75c91114df0 100644 --- a/swift/Tests/CoinTypeTests.swift +++ b/swift/Tests/CoinTypeTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class CoinTypeTests: XCTestCase { diff --git a/swift/Tests/DataTests.swift b/swift/Tests/DataTests.swift index eee71d6743a..37e93bb4f09 100644 --- a/swift/Tests/DataTests.swift +++ b/swift/Tests/DataTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class DataTests: XCTestCase { diff --git a/swift/Tests/DerivationPathTests.swift b/swift/Tests/DerivationPathTests.swift index 3867d434847..4e4a6649af3 100644 --- a/swift/Tests/DerivationPathTests.swift +++ b/swift/Tests/DerivationPathTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class DerivationPathTests: XCTestCase { diff --git a/swift/Tests/HDWalletTests.swift b/swift/Tests/HDWalletTests.swift index 537f8b0a961..978efee5737 100644 --- a/swift/Tests/HDWalletTests.swift +++ b/swift/Tests/HDWalletTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest extension HDWallet { diff --git a/swift/Tests/HashTests.swift b/swift/Tests/HashTests.swift index fc192dceebe..481b4d03cf6 100644 --- a/swift/Tests/HashTests.swift +++ b/swift/Tests/HashTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class HashTests: XCTestCase { diff --git a/swift/Tests/Keystore/AccountTests.swift b/swift/Tests/Keystore/AccountTests.swift index 772e741ea56..ec7b6963765 100755 --- a/swift/Tests/Keystore/AccountTests.swift +++ b/swift/Tests/Keystore/AccountTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class AccountTests: XCTestCase { diff --git a/swift/Tests/Keystore/KeyStoreTests.swift b/swift/Tests/Keystore/KeyStoreTests.swift index 62d907ccfaf..916d2366071 100755 --- a/swift/Tests/Keystore/KeyStoreTests.swift +++ b/swift/Tests/Keystore/KeyStoreTests.swift @@ -6,7 +6,7 @@ @testable import WalletCore -import WalletCore +@testable import WalletCore import XCTest extension KeyStore { diff --git a/swift/Tests/Keystore/KeystoreKeyTests.swift b/swift/Tests/Keystore/KeystoreKeyTests.swift index b33659ceaef..d71694b0fe1 100755 --- a/swift/Tests/Keystore/KeystoreKeyTests.swift +++ b/swift/Tests/Keystore/KeystoreKeyTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class KeystoreKeyTests: XCTestCase { diff --git a/swift/Tests/Keystore/WalletTests.swift b/swift/Tests/Keystore/WalletTests.swift index 00815ed0271..29b5f2c02ed 100755 --- a/swift/Tests/Keystore/WalletTests.swift +++ b/swift/Tests/Keystore/WalletTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class WalletTests: XCTestCase { func testSeparateAccounts() throws { diff --git a/swift/Tests/MnemonicTests.swift b/swift/Tests/MnemonicTests.swift index e76baa79185..01e2be9116a 100644 --- a/swift/Tests/MnemonicTests.swift +++ b/swift/Tests/MnemonicTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class MnemonicTests: XCTestCase { diff --git a/swift/Tests/PBKDF2Tests.swift b/swift/Tests/PBKDF2Tests.swift index c5ccbadc1af..25538740dd3 100644 --- a/swift/Tests/PBKDF2Tests.swift +++ b/swift/Tests/PBKDF2Tests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class PBKDF2Tests: XCTestCase { diff --git a/swift/Tests/PrivateKeyTests.swift b/swift/Tests/PrivateKeyTests.swift index bc9ae7e13ff..41f51d8fdfd 100644 --- a/swift/Tests/PrivateKeyTests.swift +++ b/swift/Tests/PrivateKeyTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class PrivateKeyTests: XCTestCase { diff --git a/swift/Tests/PublicKeyTests.swift b/swift/Tests/PublicKeyTests.swift index 5819e3d3ed0..488f3538e45 100644 --- a/swift/Tests/PublicKeyTests.swift +++ b/swift/Tests/PublicKeyTests.swift @@ -4,7 +4,7 @@ // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. -import WalletCore +@testable import WalletCore import XCTest class PublicKeyTests: XCTestCase { diff --git a/swift/Tests/TransactionCompilerTests.swift b/swift/Tests/TransactionCompilerTests.swift index 05ff08f7457..eb3cbf3ed3f 100644 --- a/swift/Tests/TransactionCompilerTests.swift +++ b/swift/Tests/TransactionCompilerTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore class TransactionCompilerTests: XCTestCase { override func setUp() { diff --git a/swift/Tests/UniversalAssetIDTests.swift b/swift/Tests/UniversalAssetIDTests.swift index 73ad5ac8358..a69c8a6aa40 100644 --- a/swift/Tests/UniversalAssetIDTests.swift +++ b/swift/Tests/UniversalAssetIDTests.swift @@ -5,7 +5,7 @@ // file LICENSE at the root of the source code distribution tree. import XCTest -import WalletCore +@testable import WalletCore public extension UniversalAssetID { init(coin: CoinType) { diff --git a/swift/fastlane/Fastfile b/swift/fastlane/Fastfile index 298bcb35a56..5fa18ea4945 100644 --- a/swift/fastlane/Fastfile +++ b/swift/fastlane/Fastfile @@ -13,7 +13,7 @@ platform :ios do create_xcframework( workspace: 'TrustWalletCore.xcworkspace', scheme: 'WalletCore', - destinations: ['iOS', 'macOS'], + destinations: ['iOS'], xcframework_output_directory: 'build', enable_bitcode: false ) @@ -24,7 +24,7 @@ platform :ios do create_xcframework( workspace: 'TrustWalletCore.xcworkspace', scheme: 'SwiftProtobuf', - destinations: ['iOS', 'macOS'], + destinations: ['iOS'], xcframework_output_directory: 'build', enable_bitcode: false ) diff --git a/tools/rust-bindgen b/tools/rust-bindgen index ab885868d1c..305d50b1dd8 100755 --- a/tools/rust-bindgen +++ b/tools/rust-bindgen @@ -8,7 +8,7 @@ HEADER_NAME="WalletCoreRSBindgen.h" create_xc_framework() { rm -rf $TARGET_XCFRAMEWORK_NAME - xcodebuild -create-xcframework -library $BUILD_FOLDER/$TARGET_NAME -library $BUILD_FOLDER/darwin_universal/$TARGET_NAME -library $BUILD_FOLDER/aarch64-apple-ios/release/$TARGET_NAME -library $BUILD_FOLDER/catalyst/$TARGET_NAME -output $TARGET_XCFRAMEWORK_NAME + xcodebuild -create-xcframework -library $BUILD_FOLDER/$TARGET_NAME -library $BUILD_FOLDER/darwin_universal/$TARGET_NAME -library $BUILD_FOLDER/aarch64-apple-ios/release/$TARGET_NAME -output $TARGET_XCFRAMEWORK_NAME } cd rust