diff --git a/CHANGELOG b/CHANGELOG index 92da1e8ce..02a849008 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,13 @@ -* 36a3eb9 - (HEAD -> release/3.7.0, tag: develop-230, origin/develop, develop) Merge pull request #283 from tangem/master -* 134866c - (tag: develop-229, tag: 29) Merge pull request #280 from tangem/IOS-3575-sdk-research-implement-custom-card-image -* 4751c9c - Merge branch 'develop' into IOS-3575-sdk-research-implement-custom-card-image -* b6fabd2 - IOS-3575 Displaying UIImage as an NFC tag for more flexibility -* 15cfa9a - IOS-3575 Renamed the type -* e3d7b78 - IOS-3575 Changed the code order -* 69bf337 - IOS-3575 Added some docs -* 83fe4f6 - IOS-3575 Whitespace -* 3f9e59c - IOS-3575 Added a way to show an image in the ReadView \ No newline at end of file +* 8fc17cbf - (HEAD -> release/3.8.0, tag: develop-233, origin/develop, develop) Merge pull request #288 from tangem/IOS-3632-refactor-the-way-nfc-tag-is-used-in-the-sdk +|\ +| * ee3bf439 - IOS-3632 Renamed the NFCTag enum +| * 9c2b4d77 - IOS-3632 Revert "IOS-3632 Renamed NFCTag -> ScanTagImage. Moved it out of style into config" +| * b38f991c - IOS-3632 Revert "IOS-3632 Grammar" +| * 560d5ae8 - IOS-3632 Grammar +| * 83385d67 - IOS-3632 Renamed NFCTag -> ScanTagImage. Moved it out of style into config +|/ +* 4d94be84 - (tag: develop-232) Merge pull request #286 from tangem/IOS-3604_add_schnorr +|\ +| * c8c63b70 - IOS-3604 Add support for schnorr wallet creation +|/ +* 057dc40d - (tag: develop-231) Merge pull request #285 from tangem/master \ No newline at end of file diff --git a/TangemSdk.podspec b/TangemSdk.podspec index dd41d177d..ff47681c2 100644 --- a/TangemSdk.podspec +++ b/TangemSdk.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'TangemSdk' - s.version = '3.7.0' + s.version = '3.8.0' s.summary = 'Use TangemSdk for Tangem cards integration' # This description is used to generate tags and improve search results. diff --git a/TangemSdk/TangemSdk/Common/Card/EllipticCurve.swift b/TangemSdk/TangemSdk/Common/Card/EllipticCurve.swift index 713d8e684..3d06fe2ba 100644 --- a/TangemSdk/TangemSdk/Common/Card/EllipticCurve.swift +++ b/TangemSdk/TangemSdk/Common/Card/EllipticCurve.swift @@ -17,4 +17,5 @@ public enum EllipticCurve: String, StringCodable, CaseIterable { case bls12381_G2 case bls12381_G2_AUG case bls12381_G2_POP + case bip0340 } diff --git a/TangemSdk/TangemSdk/Crypto/CryptoUtils.swift b/TangemSdk/TangemSdk/Crypto/CryptoUtils.swift index 36658dbe4..0be332d37 100644 --- a/TangemSdk/TangemSdk/Crypto/CryptoUtils.swift +++ b/TangemSdk/TangemSdk/Crypto/CryptoUtils.swift @@ -57,8 +57,8 @@ public enum CryptoUtils { let sig = try P256.Signing.ECDSASignature(rawRepresentation: signature) return pubKey.isValidSignature(sig, for: message) - case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP: - // TODO: Add support for BLS keys. + case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340: + // TODO: implement throw TangemSdkError.unsupportedCurve } } @@ -73,8 +73,8 @@ public enum CryptoUtils { case .secp256r1: let key = try? P256.Signing.PrivateKey(rawRepresentation: privateKey) return key != nil - case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP: - // TODO: Add support for BLS keys. + case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340: + // TODO: implement throw TangemSdkError.unsupportedCurve } } @@ -90,8 +90,8 @@ public enum CryptoUtils { case .secp256r1: let key = try P256.Signing.PrivateKey(rawRepresentation: privateKey) return key.publicKey.rawRepresentation - case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP: - // TODO: Add support for BLS keys. + case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340: + // TODO: implement throw TangemSdkError.unsupportedCurve } } @@ -121,8 +121,8 @@ public enum CryptoUtils { let pubKey = try P256.Signing.PublicKey(x963Representation: publicKey) let sig = try P256.Signing.ECDSASignature(rawRepresentation: signature) return pubKey.isValidSignature(sig, for: CustomSha256Digest(hash: hash)) - case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP: - // TODO: Add support for BLS keys. + case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340: + // TODO: implement throw TangemSdkError.unsupportedCurve } } diff --git a/TangemSdk/TangemSdk/Crypto/HDWallet/BIP32/BIP32.swift b/TangemSdk/TangemSdk/Crypto/HDWallet/BIP32/BIP32.swift index 1e8537db1..6d61c4ff6 100644 --- a/TangemSdk/TangemSdk/Crypto/HDWallet/BIP32/BIP32.swift +++ b/TangemSdk/TangemSdk/Crypto/HDWallet/BIP32/BIP32.swift @@ -74,6 +74,9 @@ fileprivate extension EllipticCurve { case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP: // https://eips.ethereum.org/EIPS/eip-2333#derive_master_sk fatalError("not applicable for this curve") + case .bip0340: + // TODO: https://tangem.atlassian.net/browse/IOS-3606 + fatalError("not applicable for this curve") } } } diff --git a/TangemSdk/TangemSdk/UI/TangemSdkStyle.swift b/TangemSdk/TangemSdk/UI/TangemSdkStyle.swift index 3b40f2f6b..1d921749b 100644 --- a/TangemSdk/TangemSdk/UI/TangemSdkStyle.swift +++ b/TangemSdk/TangemSdk/UI/TangemSdkStyle.swift @@ -14,7 +14,7 @@ public class TangemSdkStyle: ObservableObject { public var colors: Colors = .default public var textSizes: TextSizes = .default public var indicatorWidth: Float = 12 - public var nfcTag: NFCTag = .genericCard + public var scanTagImage: ScanTagImage = .genericCard public static var `default`: TangemSdkStyle = .init() } @@ -71,11 +71,11 @@ public extension TangemSdkStyle { @available(iOS 13.0, *) public extension TangemSdkStyle { /// Options for displaying different tags on the scanning screen - enum NFCTag { + enum ScanTagImage { /// Generic card provided by the SDK case genericCard - /// A custom tag made out of an UIImage instance. + /// A custom tag made out of a UIImage instance. /// The image can be shifted vertically from the standard position by specifying `verticalOffset`. /// Note that the width of the image will be limited to a certain size, while the height will be determined by the aspect ratio of the image. /// The value of the width can be found in ReadView.swift and is 210 points at the time of the writing. diff --git a/TangemSdk/TangemSdk/UI/Views/Scan/ReadView.swift b/TangemSdk/TangemSdk/UI/Views/Scan/ReadView.swift index 42eabc79e..4a8bc8569 100644 --- a/TangemSdk/TangemSdk/UI/Views/Scan/ReadView.swift +++ b/TangemSdk/TangemSdk/UI/Views/Scan/ReadView.swift @@ -42,7 +42,7 @@ struct ReadView: View { @ViewBuilder private var tagView: some View { - switch style.nfcTag { + switch style.scanTagImage { case .genericCard: CardView(cardColor: style.colors.cardColor, starsColor: style.colors.starsColor) case .image(let uiImage, let verticalOffset): diff --git a/VERSION b/VERSION index 7c69a55db..19811903a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.0 +3.8.0