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

Ios 4169 add bls signature lib #317

Merged
merged 5 commits into from
Aug 11, 2023
Merged
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
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- TangemSdk (3.3.4)
- TangemSdk (3.8.0)

DEPENDENCIES:
- TangemSdk (from `../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
TangemSdk: 9ea2c230bd616787bdccc5fb3ab36925d06199d4
TangemSdk: f3adf8d0c18bf7a76406462fa31c0efa9f2efa93

PODFILE CHECKSUM: fb4745483d8583db4c8ae8aa3ccbde86ca112a6b

COCOAPODS: 1.11.3
COCOAPODS: 1.12.1
12 changes: 9 additions & 3 deletions Example/TangemSdkExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
2D9AFD722A852FB600DF7002 /* Bls_Signature.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D9AFD712A852FB600DF7002 /* Bls_Signature.xcframework */; };
2D9AFD732A852FB600DF7002 /* Bls_Signature.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2D9AFD712A852FB600DF7002 /* Bls_Signature.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
3672187517CA258835D737D6 /* Pods_TangemSdkExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F391CC3724B714DAE6648A97 /* Pods_TangemSdkExample.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
5D031FFD266A6960008472EC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D031FFC266A6960008472EC /* ContentView.swift */; };
5D031FFE266A6960008472EC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D031FFC266A6960008472EC /* ContentView.swift */; };
Expand Down Expand Up @@ -62,6 +64,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
2D9AFD732A852FB600DF7002 /* Bls_Signature.xcframework in Embed Frameworks */,
5DBC25CC235F0639005F0C79 /* TangemSdk.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
Expand All @@ -70,6 +73,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
2D9AFD712A852FB600DF7002 /* Bls_Signature.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Bls_Signature.xcframework; path = ../TangemSdk/TangemSdk/Frameworks/Bls_Signature.xcframework; sourceTree = "<group>"; };
5D031FFC266A6960008472EC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
5D032000266A6A15008472EC /* AppModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppModel.swift; sourceTree = "<group>"; };
5D032008266A8523008472EC /* ExampleButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleButton.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -110,6 +114,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2D9AFD722A852FB600DF7002 /* Bls_Signature.xcframework in Frameworks */,
5DBC25CB235F0639005F0C79 /* TangemSdk.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -187,6 +192,7 @@
5D78C1D7234F4400008D7478 /* Frameworks */ = {
isa = PBXGroup;
children = (
2D9AFD712A852FB600DF7002 /* Bls_Signature.xcframework */,
5DCA54A0235E0D5900C2BB99 /* TangemSdk.framework */,
F391CC3724B714DAE6648A97 /* Pods_TangemSdkExample.framework */,
);
Expand Down Expand Up @@ -288,7 +294,7 @@
};
};
};
buildConfigurationList = 5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSDKExample" */;
buildConfigurationList = 5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSdkExample" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand Down Expand Up @@ -692,7 +698,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSDKExample" */ = {
5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSdkExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5D78C1C8234F435C008D7478 /* Debug */,
Expand Down
1 change: 1 addition & 0 deletions TangemSdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ Tangem is a Swiss-based secure hardware wallet manufacturer that enables blockch
'TangemSdk/TangemSdk/Haptics/*.ahap',
'TangemSdk/TangemSdk/**/Wordlists/*.txt']}

s.vendored_frameworks = 'TangemSdk/TangemSdk/Frameworks/Bls_Signature.xcframework'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>Bls_Signature.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>Bls_Signature.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface BlsSignature: NSObject

+ (NSString *)publicKeyFrom:(NSString *)privateKey with:(NSError **)error;
+ (NSString *)augSchemeMplG2Map:(NSString *)hashPublicKey and:(NSString*)hashMessage with:(NSError **)error;
+ (NSString *)aggregate: (NSArray<NSString *> *)signatures with:(NSError **)error;
+ (BOOL)verify: (NSArray<NSString *> *)signatures with:(NSString *)publicKey and:(NSString *)message;

@end

NS_ASSUME_NONNULL_END
Loading
Loading