@onekeyfe/react-native-lite-card 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/LICENSE +20 -0
  2. package/android/build.gradle +102 -0
  3. package/android/gradle.properties +5 -0
  4. package/android/src/main/AndroidManifest.xml +3 -0
  5. package/android/src/main/assets/config/command.json +205 -0
  6. package/android/src/main/cpp/CMakeLists.txt +15 -0
  7. package/android/src/main/cpp/validation.c +227 -0
  8. package/android/src/main/cpp/validation.h +19 -0
  9. package/android/src/main/java/so/onekey/app/wallet/LoggerManager.kt +35 -0
  10. package/android/src/main/java/so/onekey/app/wallet/OKLiteManager.kt +399 -0
  11. package/android/src/main/java/so/onekey/app/wallet/OKLitePackage.kt +16 -0
  12. package/android/src/main/java/so/onekey/app/wallet/keys/KeysNativeProvider.kt +13 -0
  13. package/android/src/main/java/so/onekey/app/wallet/nfc/Exceptions.kt +58 -0
  14. package/android/src/main/java/so/onekey/app/wallet/nfc/NfcUtils.kt +151 -0
  15. package/android/src/main/java/so/onekey/app/wallet/nfc/broadcast/NfcStatusChangeBroadcastReceiver.kt +56 -0
  16. package/android/src/main/java/so/onekey/app/wallet/nfc/gpchannel/GPChannelNatives.kt +32 -0
  17. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/NfcConstant.kt +38 -0
  18. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/OnekeyLiteCard.kt +241 -0
  19. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/APDUParam.kt +17 -0
  20. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/CardInfo.java +84 -0
  21. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/CardResponse.java +37 -0
  22. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/CardState.kt +10 -0
  23. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/ParsedCertInfo.java +39 -0
  24. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/SecureChanelParam.java +113 -0
  25. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/entitys/SendResponse.kt +26 -0
  26. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/nfc/CommandGenerator.kt +178 -0
  27. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/nfc/Connection.kt +430 -0
  28. package/android/src/main/java/so/onekey/app/wallet/onekeyLite/nfc/GPCAPDUGenerator.kt +56 -0
  29. package/android/src/main/java/so/onekey/app/wallet/utils/EventUtils.kt +14 -0
  30. package/android/src/main/java/so/onekey/app/wallet/utils/GpsUtil.kt +38 -0
  31. package/android/src/main/java/so/onekey/app/wallet/utils/HexUtils.java +93 -0
  32. package/android/src/main/java/so/onekey/app/wallet/utils/LogUtil.kt +11 -0
  33. package/android/src/main/java/so/onekey/app/wallet/utils/MiUtil.kt +93 -0
  34. package/android/src/main/java/so/onekey/app/wallet/utils/NfcPermissionUtils.kt +24 -0
  35. package/android/src/main/java/so/onekey/app/wallet/utils/Utils.java +433 -0
  36. package/android/src/main/jniLibs/arm64-v8a/libgpchannelNDK.so +0 -0
  37. package/android/src/main/jniLibs/armeabi-v7a/libgpchannelNDK.so +0 -0
  38. package/ios/Classes/OKLiteCommand/OKLiteCommandModal.h +39 -0
  39. package/ios/Classes/OKLiteCommand/OKLiteCommandModal.m +143 -0
  40. package/ios/Classes/OKLiteCommand/OKLiteCommandTool.h +28 -0
  41. package/ios/Classes/OKLiteCommand/OKLiteCommandTool.m +53 -0
  42. package/ios/Classes/OKLiteManager.h +17 -0
  43. package/ios/Classes/OKLiteManager.m +222 -0
  44. package/ios/Classes/OKNFCBridge.h +28 -0
  45. package/ios/Classes/OKNFCBridge.mm +221 -0
  46. package/ios/Classes/OKNFCLiteDefine.h +108 -0
  47. package/ios/Classes/OKNFTLite/OKLiteProtocol.h +37 -0
  48. package/ios/Classes/OKNFTLite/OKLiteV1.h +41 -0
  49. package/ios/Classes/OKNFTLite/OKLiteV1.m +602 -0
  50. package/ios/Classes/OKNFTLite/OKLiteV2.h +17 -0
  51. package/ios/Classes/OKNFTLite/OKLiteV2.m +132 -0
  52. package/ios/Classes/OKNFTLite/OKNFCManager.h +40 -0
  53. package/ios/Classes/OKNFTLite/OKNFCManager.m +330 -0
  54. package/ios/Classes/Utils/NFCConfig.h +19 -0
  55. package/ios/Classes/Utils/NFCConfig.m +18 -0
  56. package/ios/Classes/Utils/NSData+OKNFCHexData.h +17 -0
  57. package/ios/Classes/Utils/NSData+OKNFCHexData.m +24 -0
  58. package/ios/Classes/Utils/NSData+StringToData.h +12 -0
  59. package/ios/Classes/Utils/NSData+StringToData.m +25 -0
  60. package/ios/Classes/Utils/NSString+OKAdd.h +14 -0
  61. package/ios/Classes/Utils/NSString+OKAdd.m +40 -0
  62. package/ios/Classes/Utils/NSString+OKNFCHexStr.h +18 -0
  63. package/ios/Classes/Utils/NSString+OKNFCHexStr.m +38 -0
  64. package/ios/Classes/Utils/OKNFCUtility.h +18 -0
  65. package/ios/Classes/Utils/OKNFCUtility.m +22 -0
  66. package/ios/Classes/Utils/OKTools.h +17 -0
  67. package/ios/Classes/Utils/OKTools.m +21 -0
  68. package/ios/GPChannelSDKCore.framework/GPChannelSDKCore +0 -0
  69. package/ios/GPChannelSDKCore.framework/Headers/GPChannelSDK.h +315 -0
  70. package/ios/GPChannelSDKCore.framework/Headers/GPChannelSDKCore.h +19 -0
  71. package/ios/GPChannelSDKCore.framework/Info.plist +0 -0
  72. package/ios/GPChannelSDKCore.framework/Modules/module.modulemap +7 -0
  73. package/ios/GPChannelSDKCore.framework/_CodeSignature/CodeResources +147 -0
  74. package/keys/keys.c +51 -0
  75. package/keys/keys.h +4 -0
  76. package/lib/commonjs/index.js +114 -0
  77. package/lib/commonjs/index.js.map +1 -0
  78. package/lib/commonjs/types.js +27 -0
  79. package/lib/commonjs/types.js.map +1 -0
  80. package/lib/module/index.js +108 -0
  81. package/lib/module/index.js.map +1 -0
  82. package/lib/module/types.js +21 -0
  83. package/lib/module/types.js.map +1 -0
  84. package/lib/typescript/src/index.d.ts +35 -0
  85. package/lib/typescript/src/index.d.ts.map +1 -0
  86. package/lib/typescript/src/types.d.ts +31 -0
  87. package/lib/typescript/src/types.d.ts.map +1 -0
  88. package/package.json +166 -0
  89. package/react-native-lite-card.podspec +42 -0
  90. package/src/index.ts +154 -0
  91. package/src/types.ts +37 -0
@@ -0,0 +1,221 @@
1
+ //
2
+ // Bridge.m
3
+ // NFCTagReader
4
+ //
5
+ // Created by zj on 2021/3/16.
6
+ // Copyright © 2021 Apple. All rights reserved.
7
+ //
8
+
9
+ #if !TARGET_OS_SIMULATOR
10
+
11
+ #import <GPChannelSDKCore/GPChannelSDKCore.h>
12
+ #import "OKNFCLiteDefine.h"
13
+ #import "NFCConfig.h"
14
+
15
+ #endif
16
+
17
+
18
+
19
+ #import "OKNFCBridge.h"
20
+
21
+ @implementation OKNFCBridge
22
+
23
+ #if !TARGET_OS_SIMULATOR
24
+
25
+ + (NFCISO7816APDU *)buildAPDUWith_cla:(unsigned long)cla
26
+ ins:(unsigned long)ins
27
+ p1:(unsigned long)p1
28
+ p2:(unsigned long)p2
29
+ data:(NSString *)data
30
+ encrypt:(BOOL)encrypt {
31
+ JUB_RV rv = JUBR_ERROR;
32
+ JUB_CHAR_CPTR c_data = [data UTF8String];
33
+
34
+ JUB_CHAR_PTR c_apdu = NULL;
35
+
36
+ if (encrypt) {
37
+ rv = JUB_GPC_BuildSafeAPDU(cla, ins, p1, p2, c_data, &c_apdu);
38
+ } else {
39
+ rv = JUB_GPC_BuildAPDU(cla, ins, p1, p2, c_data, &c_apdu);
40
+ }
41
+
42
+ if (JUBR_OK != rv) {
43
+ return nil;
44
+ }
45
+
46
+ NSString *hexStr = [NSString stringWithCString:c_apdu encoding:NSUTF8StringEncoding];
47
+ NSData *APDUData = [hexStr dataFromHexString];
48
+ NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithData:APDUData];
49
+ return apdu;
50
+ }
51
+
52
+ + (NSString *)parseSafeAPDUResponse:(NSData *)data sw1:(uint8_t)sw1 sw2:(uint8_t)sw2 {
53
+
54
+ JUB_RV rv = JUBR_ERROR;
55
+
56
+ NSMutableData *mutableRaw = [[NSMutableData alloc] initWithData:data];
57
+ [mutableRaw appendBytes:&sw1 length:sizeof(sw1)];
58
+ [mutableRaw appendBytes:&sw2 length:sizeof(sw2)];
59
+
60
+ JUB_CHAR_CPTR c_data = [mutableRaw.toHexString UTF8String];
61
+
62
+ JUB_UINT16 wRet = 0;
63
+ JUB_CHAR_PTR pDecResp = nullptr;
64
+ rv = JUB_GPC_ParseSafeAPDUResponse(c_data ,&wRet, &pDecResp);
65
+ if (JUBR_OK != rv) {
66
+ return nil;
67
+ }
68
+
69
+ NSString *resp = [NSString stringWithCString:pDecResp encoding:NSUTF8StringEncoding];
70
+ JUB_FreeMemory(pDecResp);
71
+
72
+ return resp;
73
+ }
74
+
75
+ + (BOOL)parseAPDUResponse:(NSData *)data {
76
+
77
+ JUB_RV rv = JUBR_ERROR;
78
+ JUB_ULONG tag = 0;
79
+ JUB_CHAR_PTR value;
80
+ JUB_CHAR_CPTR c_data = [[data toHexString] UTF8String];
81
+
82
+ rv = JUB_GPC_TLVDecode(c_data, &tag, &value);
83
+ if (JUBR_OK != rv) {
84
+ return NO;
85
+ }
86
+
87
+ JUB_UINT16 wRet = 0;
88
+ JUB_CHAR_PTR pDecResp = nullptr;
89
+ rv = JUB_GPC_ParseAPDUResponse(c_data,&wRet, &pDecResp);
90
+ if (JUBR_OK != rv) {
91
+ return NO;
92
+ }
93
+
94
+ JUB_FreeMemory(pDecResp);
95
+
96
+ return YES;
97
+ }
98
+
99
+ + (NFCISO7816APDU *)buildAPDUWithStr:(NSString *)str encrypt:(BOOL)encrypt {
100
+ if (![str hasPrefix:@"0x"]) {
101
+ NSAssert(0, @"must starts with 0x");
102
+ return nil;
103
+ }
104
+
105
+ // drop str[10:12], since coreNFC will cal it for us.
106
+ NSString *meta = [str substringWithRange:NSMakeRange(0, 10)];
107
+ NSString *data = @"";
108
+ if (str.length > 12) {
109
+ data = [str substringFromIndex:12];
110
+ }
111
+
112
+ unsigned long long outVal;
113
+ NSScanner* scanner = [NSScanner scannerWithString:meta];
114
+ [scanner scanHexLongLong:&outVal];
115
+
116
+ unsigned long cla = outVal >> 24 & 0xff;
117
+ unsigned long ins = outVal >> 16 & 0xff;
118
+ unsigned long p1 = outVal >> 8 & 0xff;
119
+ unsigned long p2 = outVal & 0xff;
120
+
121
+ return [OKNFCBridge buildAPDUWith_cla:cla ins:ins p1:p1 p2:p2 data:data encrypt:encrypt];
122
+ }
123
+
124
+
125
+ + (NSString *)mutualAuthData {
126
+ JUB_CHAR_PTR mutualAuthData;
127
+ JUB_RV rv = JUB_GPC_BuildMutualAuthData(&mutualAuthData);
128
+
129
+ if (JUBR_OK != rv) {
130
+ return nil;
131
+ }
132
+
133
+ return [NSString stringWithFormat:@"%s", mutualAuthData];
134
+ }
135
+
136
+ + (BOOL)openChannel:(NSData *)authRes {
137
+ JUB_CHAR_CPTR authResp = [[authRes toHexString] UTF8String];
138
+ JUB_RV rv;
139
+
140
+ rv = JUB_GPC_OpenSecureChannel(authResp);
141
+ if (JUBR_OK != rv) {
142
+ NSLog(@"error: JUB_GPC_OpenSecureChannel");
143
+ return NO;
144
+ }
145
+ NSLog(@"OKNFC: openChannel success.");
146
+ return YES;
147
+ }
148
+
149
+ + (BOOL)JUB_GPC_Initialize:(NSData *)cert {
150
+ JUB_RV rv = JUBR_ERROR;
151
+ JUB_ULONG tag = 0;
152
+ JUB_CHAR_PTR value;
153
+ JUB_CHAR_CPTR c_data = [[cert toHexString] UTF8String];
154
+
155
+ rv = JUB_GPC_TLVDecode(c_data, &tag, &value);
156
+ if (JUBR_OK != rv) {
157
+ return NO;
158
+ }
159
+
160
+ JUB_CHAR_PTR sn = nullptr;
161
+ JUB_CHAR_PTR subjectID = nullptr;
162
+ rv = JUB_GPC_ParseCertificate(value, &sn, &subjectID);
163
+ if (JUBR_OK != rv) {
164
+ return NO;
165
+ }
166
+
167
+ NSLog(@"OKNFC: subjectID: %s",subjectID);
168
+ GPC_SCP11_SHAREDINFO shareInfo;
169
+ shareInfo.scpID = (char *)"1107";
170
+ shareInfo.keyUsage = (char *)"3C";
171
+ shareInfo.keyType = (char *)"88";
172
+ shareInfo.keyLength = (char *)"10";
173
+ shareInfo.hostID = (char *)"8080808080808080";
174
+ shareInfo.cardGroupID = subjectID;
175
+
176
+ // initParams.json -> sk
177
+ char *sk = (char *)[[NFCConfig envFor:@"sk"] UTF8String];
178
+
179
+ rv = JUB_GPC_Initialize(shareInfo, [NFCConfig envFor:@"crt"].UTF8String, sk);
180
+
181
+ if (JUBR_OK != rv) {
182
+ return NO;
183
+ }
184
+
185
+ NSLog(@"OKNFC: JUB_GPC_Initialize OK.");
186
+ return YES;
187
+ }
188
+
189
+ + (void)closeSecureChannel {
190
+ JUB_GPC_Finalize();
191
+ }
192
+
193
+ + (BOOL)verifySN:(NSString *)cardSN withCert:(NSData *)cert {
194
+ JUB_RV rv = JUBR_ERROR;
195
+ JUB_ULONG tag = 0;
196
+ JUB_CHAR_PTR value;
197
+ JUB_CHAR_CPTR c_data = [[cert toHexString] UTF8String];
198
+
199
+ rv = JUB_GPC_TLVDecode(c_data, &tag, &value);
200
+ if (JUBR_OK != rv) {
201
+ return NO;
202
+ }
203
+
204
+ JUB_CHAR_PTR sn = nullptr;
205
+ JUB_CHAR_PTR subjectID = nullptr;
206
+ rv = JUB_GPC_ParseCertificate(value, &sn, &subjectID);
207
+ if (JUBR_OK != rv) {
208
+ return NO;
209
+ }
210
+
211
+ NSString *certSN = [NSString stringWithCString:sn encoding:NSUTF8StringEncoding];
212
+
213
+ BOOL identical = [certSN isEqualToString:cardSN];
214
+
215
+ NSLog(@"OKNFC: certSN: %@; cardSN: %@; identical: %@",certSN, cardSN, identical ? @"YES✅" : @"NO❌");
216
+ return identical;
217
+ }
218
+
219
+ #endif
220
+
221
+ @end
@@ -0,0 +1,108 @@
1
+ //
2
+ // OKNFCLiteDefine.m
3
+ // OneKeyWallet
4
+ //
5
+ // Created by linleiqin on 2023/6/27.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import "NSString+OKNFCHexStr.h"
10
+ #import "NSData+OKNFCHexData.h"
11
+
12
+ typedef NS_ENUM(NSInteger, OKLiteCommand) {
13
+ OKLiteCommandSelectSecure = 0,
14
+ OKLiteCommandSelectBackup,
15
+ OKLiteCommandGetCardSN,
16
+ OKLiteCommandGetCardCert,
17
+ OKLiteCommandGetBackupStatus,
18
+ OKLiteCommandGetPINStatus,
19
+ OKLiteCommandSetPIN,
20
+ OKLiteCommandChangePIN,
21
+ OKLiteCommandVerifyPIN,
22
+ OKLiteCommandImportMnemonic,
23
+ OKLiteCommandExportMnemonic,
24
+ OKLiteCommandWipeCard,
25
+ OKLiteCommandPinRTL,
26
+ OKLiteCommandOpenChannel_1,
27
+ OKLiteCommandOpenChannel_2,
28
+ };
29
+
30
+ typedef NS_ENUM(NSInteger, OKNFCLiteSessionType) {
31
+ OKNFCLiteSessionTypeNone = 0,
32
+ OKNFCLiteSessionTypeGetInfo,
33
+ OKNFCLiteSessionTypeSetMnemonic,
34
+ OKNFCLiteSessionTypeSetMnemonicForce,
35
+ OKNFCLiteSessionTypeGetMnemonic,
36
+ OKNFCLiteSessionTypeReset,
37
+ OKNFCLiteSessionTypeUpdateInfo,
38
+ OKNFCLiteSessionTypeChangePin,
39
+ };
40
+
41
+ typedef NS_ENUM(NSInteger, OKNFCLiteStatus) {
42
+ OKNFCLiteStatusError = -1,
43
+ OKNFCLiteStatusNewCard = 0,
44
+ OKNFCLiteStatusActivated = 1,
45
+ OKNFCLiteStatusSNNotMatch,
46
+ };
47
+
48
+ typedef NS_ENUM(NSInteger, OKNFCLiteSetMncStatus) {
49
+ OKNFCLiteSetMncStatusError = -1,
50
+ OKNFCLiteSetMncStatusSuccess = 0,
51
+ OKNFCLiteSetMncStatusSNNotMatch,
52
+ OKNFCLiteSetMncStatusPinNotMatch,
53
+ OKNFCLiteSetMncStatusWiped,
54
+ OKNFCLiteSetMncStatusCancel
55
+ };
56
+
57
+ typedef NS_ENUM(NSInteger, OKNFCLiteGetMncStatus) {
58
+ OKNFCLiteGetMncStatusError = -1,
59
+ OKNFCLiteGetMncStatusSuccess = 0,
60
+ OKNFCLiteGetMncStatusSNNotMatch,
61
+ OKNFCLiteGetMncStatusPinNotMatch,
62
+ OKNFCLiteGetMncStatusWiped,
63
+ OKNFCLiteGetMncStatusCancel,
64
+ };
65
+
66
+ typedef NS_ENUM(NSInteger, OKNFCLiteChangePinStatus) {
67
+ OKNFCLiteChangePinStatusError = -1,
68
+ OKNFCLiteChangePinStatusSuccess = 0,
69
+ OKNFCLiteChangePinStatusSNNotMatch,
70
+ OKNFCLiteChangePinStatusPinNotMatch,
71
+ OKNFCLiteChangePinStatusWiped,
72
+ OKNFCLiteChangePinStatusCancel,
73
+ };
74
+
75
+ @class OKLiteV1;
76
+ typedef void (^GetLiteInfoCallback)(OKLiteV1 *lite, OKNFCLiteStatus status);
77
+ typedef void (^ResetCallback)(OKLiteV1 *lite, BOOL isSuccess,NSError *error);
78
+ typedef void (^SetMnemonicCallback)(OKLiteV1 *lite, OKNFCLiteSetMncStatus status);
79
+ typedef void (^GetMnemonicCallback)(OKLiteV1 *lite, NSString*mnemonic, OKNFCLiteGetMncStatus status);
80
+ typedef void (^ChangePinCallback)(OKLiteV1 *lite, OKNFCLiteChangePinStatus status);
81
+
82
+ static const NSInteger OKNFC_PIN_LENGTH = 6;
83
+ static const NSInteger OKNFC_PIN_UNSET = -1;
84
+ static const NSInteger OKNFC_PIN_ERROR = -2;
85
+
86
+ typedef NS_ENUM(NSInteger, OKNFCLiteApp) {
87
+ OKNFCLiteAppNONE = -1,
88
+ OKNFCLiteAppSecure = 0, // 主安全域
89
+ OKNFCLiteAppBackup = 1, // 备份
90
+ };
91
+
92
+ typedef NS_ENUM(NSInteger, OKNFCLitePINVerifyResult) {
93
+ OKNFCLitePINVerifyResultError = -1,
94
+ OKNFCLitePINVerifyResultPass = 0,
95
+ OKNFCLitePINVerifyResultNotMatch,
96
+ };
97
+
98
+ typedef NS_ENUM(NSInteger, OKNFCLiteChangePinResult) {
99
+ OKNFCLiteChangePinResultError = -1,
100
+ OKNFCLiteChangePinResultPass = 0,
101
+ OKNFCLiteChangePinResultWiped,
102
+ };
103
+
104
+ typedef NS_ENUM(NSInteger, OKNFCLiteVersion) {
105
+ OKNFCLiteVersionV1 = 0,
106
+ OKNFCLiteVersionV2 = 1,
107
+ };
108
+
@@ -0,0 +1,37 @@
1
+ //
2
+ // OKLiteProtocol.h
3
+ // OneKeyWallet
4
+ //
5
+ // Created by linleiqin on 2023/6/27.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import "OKNFCLiteDefine.h"
10
+ #import <CoreNFC/CoreNFC.h>
11
+
12
+ NS_ASSUME_NONNULL_BEGIN
13
+
14
+ @protocol OKLiteProtocol <NSObject>
15
+
16
+ - (void)getLiteInfo:(GetLiteInfoCallback)callBack;
17
+
18
+ - (BOOL)syncLiteInfo;
19
+
20
+ - (void)setMnemonic:(NSString *)mnemonic
21
+ withPin:(NSString *)pin
22
+ overwrite:(BOOL)overwrite
23
+ complete:(SetMnemonicCallback)complete;
24
+
25
+ - (void)reset:(ResetCallback)callBack;
26
+
27
+ - (BOOL)resetSync;
28
+
29
+ - (void)getMnemonicWithPin:(NSString *)pin complete:(GetMnemonicCallback)complete;
30
+
31
+ - (void)changePin:(NSString *)oldPin to:(NSString *)newPin complete:(ChangePinCallback)complete;
32
+
33
+ - (OKNFCLitePINVerifyResult)verifyPin:(NSString *)pin;
34
+
35
+ @end
36
+
37
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,41 @@
1
+ //
2
+ // OKLiteV1.h
3
+ // OneKeyWallet
4
+ //
5
+ // Created by linleiqin on 2023/6/27.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import "OKLiteProtocol.h"
10
+ #import "OKNFCManager.h"
11
+ #import "OKNFCLiteDefine.h"
12
+ #import "OKNFCBridge.h"
13
+ #import "OKLiteCommandTool.h"
14
+
15
+
16
+ @interface OKLiteV1 : NSObject<OKLiteProtocol>
17
+ @property (nonatomic, copy) NSString *SN;
18
+ @property (nonatomic, assign) NSUInteger pinRTL;
19
+ @property (nonatomic, assign) OKNFCLiteStatus status;
20
+
21
+ @property (nonatomic, assign) OKNFCLiteVersion version;
22
+ @property (nonatomic, weak) id<OKNFCManagerDelegate> delegate;
23
+ @property (nonatomic, strong) OKLiteCommandTool *commandTool;
24
+
25
+
26
+ - (instancetype)initWithDelegate:(id<OKNFCManagerDelegate>)delegate;
27
+
28
+ - (BOOL)openSecureChannel;
29
+
30
+ - (BOOL)setPin:(NSString *)pin;
31
+
32
+ - (BOOL)setMnc:(NSString *)mnc;
33
+
34
+ - (BOOL)selectNFCAppWith:(OKLiteCommand)command;
35
+
36
+ - (BOOL)verifyCert;
37
+
38
+ - (id)cardInfo;
39
+
40
+ @end
41
+