api-gateway-react-native 1.0.0 → 2.0.1
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.
- package/README.md +6 -2
- package/android/libs/apiGateway-release.aar +0 -0
- package/ios/TNApiGetwaySDK.xcframework/Info.plist +5 -5
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Headers/TNApiGatewayCrypto.h +12 -24
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Info.plist +0 -0
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.abi.json +12 -2
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/TNApiGetwaySDK +0 -0
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/_CodeSignature/CodeResources +7 -7
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Headers/TNApiGatewayCrypto.h +12 -24
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Info.plist +0 -0
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.abi.json +12 -2
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +12 -2
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/TNApiGetwaySDK +0 -0
- package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/_CodeSignature/CodeResources +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# api-gateway-react-native
|
|
2
2
|
|
|
3
|
-
## Changelog (
|
|
3
|
+
## Changelog (v2.0.1)
|
|
4
|
+
- Initial integration of the API Gateway SDK.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Changelog (v2.0.0)
|
|
4
8
|
- Initial integration of the API Gateway SDK.
|
|
5
9
|
|
|
6
10
|
## Installation
|
|
@@ -9,7 +13,7 @@
|
|
|
9
13
|
npm install api-gateway-react-native
|
|
10
14
|
```
|
|
11
15
|
## Usage
|
|
12
|
-
|
|
16
|
+
mi
|
|
13
17
|
```js
|
|
14
18
|
import ApiGatway from 'api-gateway-react-native';
|
|
15
19
|
|
|
Binary file
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>TNApiGetwaySDK.framework/TNApiGetwaySDK</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>TNApiGetwaySDK.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
-
<string>x86_64</string>
|
|
18
17
|
</array>
|
|
19
18
|
<key>SupportedPlatform</key>
|
|
20
19
|
<string>ios</string>
|
|
21
|
-
<key>SupportedPlatformVariant</key>
|
|
22
|
-
<string>simulator</string>
|
|
23
20
|
</dict>
|
|
24
21
|
<dict>
|
|
25
22
|
<key>BinaryPath</key>
|
|
26
23
|
<string>TNApiGetwaySDK.framework/TNApiGetwaySDK</string>
|
|
27
24
|
<key>LibraryIdentifier</key>
|
|
28
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
29
26
|
<key>LibraryPath</key>
|
|
30
27
|
<string>TNApiGetwaySDK.framework</string>
|
|
31
28
|
<key>SupportedArchitectures</key>
|
|
32
29
|
<array>
|
|
33
30
|
<string>arm64</string>
|
|
31
|
+
<string>x86_64</string>
|
|
34
32
|
</array>
|
|
35
33
|
<key>SupportedPlatform</key>
|
|
36
34
|
<string>ios</string>
|
|
35
|
+
<key>SupportedPlatformVariant</key>
|
|
36
|
+
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
@@ -1,33 +1,21 @@
|
|
|
1
|
-
//
|
|
2
|
-
// TNApiGatewayCrypto.h
|
|
3
|
-
// TNMapSDK
|
|
4
|
-
//
|
|
5
|
-
|
|
6
1
|
#import <Foundation/Foundation.h>
|
|
7
2
|
|
|
8
3
|
NS_ASSUME_NONNULL_BEGIN
|
|
9
4
|
|
|
10
5
|
@interface TNApiGatewayCrypto : NSObject
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
+ (NSString *)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
+ (NSString *)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/// Equivalent to nativeClientIdentityMethod()
|
|
26
|
-
+ (NSString *)encryptClientPayload:(NSString *)jsonString
|
|
27
|
-
aesKeyBase64:(NSString *)aesKeyBase64;
|
|
28
|
-
|
|
29
|
-
/// Equivalent to nativeGetServerTime()
|
|
30
|
-
+ (NSTimeInterval)fetchServerTime;
|
|
7
|
+
+ (NSArray<NSString *> *)tnGenerateECDHKeypair;
|
|
8
|
+
+ (NSString *)tnGenerateAESKeyWithServerPublicKey:(NSString *)serverPublicKey
|
|
9
|
+
clientPrivateKey:(NSString *)clientPrivateKey;
|
|
10
|
+
+ (NSString *)tnEncryptClientIdentity:(NSString *)payloadJson
|
|
11
|
+
aesKeyBase64:(NSString *)aesKeyB64;
|
|
12
|
+
+ (NSString *)tnEncryptAESKey:(NSString *)aesKeyBase64
|
|
13
|
+
publicKeyPEM:(NSString *)serverPublicKey;
|
|
14
|
+
+ (int64_t)tnGetServerTime;
|
|
15
|
+
|
|
16
|
+
// ⚡ Add these
|
|
17
|
+
+ (NSString *)base64Encode:(NSString *)input;
|
|
18
|
+
+ (NSString *)base64EncodeData:(NSData *)data;
|
|
31
19
|
|
|
32
20
|
@end
|
|
33
21
|
|
|
Binary file
|
|
@@ -339,6 +339,16 @@
|
|
|
339
339
|
}
|
|
340
340
|
]
|
|
341
341
|
},
|
|
342
|
+
{
|
|
343
|
+
"kind": "Import",
|
|
344
|
+
"name": "Foundation",
|
|
345
|
+
"printedName": "Foundation",
|
|
346
|
+
"declKind": "Import",
|
|
347
|
+
"moduleName": "TNApiGetwaySDK",
|
|
348
|
+
"declAttributes": [
|
|
349
|
+
"RawDocComment"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
342
352
|
{
|
|
343
353
|
"kind": "Import",
|
|
344
354
|
"name": "Foundation",
|
|
@@ -1328,8 +1338,8 @@
|
|
|
1328
1338
|
"filePath": "\/Users\/technonext\/tn\/vcs\/api-gatway-ios-library \/TNApiGetwaySDK\/Config.swift",
|
|
1329
1339
|
"kind": "BooleanLiteral",
|
|
1330
1340
|
"offset": 213,
|
|
1331
|
-
"length":
|
|
1332
|
-
"value": "
|
|
1341
|
+
"length": 5,
|
|
1342
|
+
"value": "false"
|
|
1333
1343
|
},
|
|
1334
1344
|
{
|
|
1335
1345
|
"filePath": "\/Users\/technonext\/tn\/vcs\/api-gatway-ios-library \/TNApiGetwaySDK\/EncryptionCache.swift",
|
|
Binary file
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/TNApiGatewayCrypto.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
RKWRtfupzFqmOExlgERAivlwiQk=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/TNApiGetwaySDK.h</key>
|
|
16
16
|
<data>
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
</data>
|
|
19
19
|
<key>Info.plist</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
R3pBnMrKGriB0/eMMc7GdUR74vk=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.abi.json</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
OyDT6Ws6I57uUlXutI6+xq3GEUc=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
|
|
28
28
|
<data>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftmodule</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
V7H6+tRNAtulXJm/SNkIYT2FXEw=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/module.modulemap</key>
|
|
44
44
|
<data>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<dict>
|
|
59
59
|
<key>hash2</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
PYtMLHutitjnQ+dA7KVHwzaVCHcOI23u5StI1hMHuak=
|
|
62
62
|
</data>
|
|
63
63
|
</dict>
|
|
64
64
|
<key>Headers/TNApiGetwaySDK.h</key>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<dict>
|
|
73
73
|
<key>hash2</key>
|
|
74
74
|
<data>
|
|
75
|
-
|
|
75
|
+
kRhtERXyvExzeWGowARbA3KOqE6qD2Z4cUjfluMXmwA=
|
|
76
76
|
</data>
|
|
77
77
|
</dict>
|
|
78
78
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
<dict>
|
|
101
101
|
<key>hash2</key>
|
|
102
102
|
<data>
|
|
103
|
-
|
|
103
|
+
lqggZJICV5jfWuMzfL3+Ll7w+6BnJt61FAzIfeyrDAo=
|
|
104
104
|
</data>
|
|
105
105
|
</dict>
|
|
106
106
|
<key>Modules/module.modulemap</key>
|
|
@@ -1,33 +1,21 @@
|
|
|
1
|
-
//
|
|
2
|
-
// TNApiGatewayCrypto.h
|
|
3
|
-
// TNMapSDK
|
|
4
|
-
//
|
|
5
|
-
|
|
6
1
|
#import <Foundation/Foundation.h>
|
|
7
2
|
|
|
8
3
|
NS_ASSUME_NONNULL_BEGIN
|
|
9
4
|
|
|
10
5
|
@interface TNApiGatewayCrypto : NSObject
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
+ (NSString *)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
+ (NSString *)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/// Equivalent to nativeClientIdentityMethod()
|
|
26
|
-
+ (NSString *)encryptClientPayload:(NSString *)jsonString
|
|
27
|
-
aesKeyBase64:(NSString *)aesKeyBase64;
|
|
28
|
-
|
|
29
|
-
/// Equivalent to nativeGetServerTime()
|
|
30
|
-
+ (NSTimeInterval)fetchServerTime;
|
|
7
|
+
+ (NSArray<NSString *> *)tnGenerateECDHKeypair;
|
|
8
|
+
+ (NSString *)tnGenerateAESKeyWithServerPublicKey:(NSString *)serverPublicKey
|
|
9
|
+
clientPrivateKey:(NSString *)clientPrivateKey;
|
|
10
|
+
+ (NSString *)tnEncryptClientIdentity:(NSString *)payloadJson
|
|
11
|
+
aesKeyBase64:(NSString *)aesKeyB64;
|
|
12
|
+
+ (NSString *)tnEncryptAESKey:(NSString *)aesKeyBase64
|
|
13
|
+
publicKeyPEM:(NSString *)serverPublicKey;
|
|
14
|
+
+ (int64_t)tnGetServerTime;
|
|
15
|
+
|
|
16
|
+
// ⚡ Add these
|
|
17
|
+
+ (NSString *)base64Encode:(NSString *)input;
|
|
18
|
+
+ (NSString *)base64EncodeData:(NSData *)data;
|
|
31
19
|
|
|
32
20
|
@end
|
|
33
21
|
|
|
Binary file
|
|
@@ -339,6 +339,16 @@
|
|
|
339
339
|
}
|
|
340
340
|
]
|
|
341
341
|
},
|
|
342
|
+
{
|
|
343
|
+
"kind": "Import",
|
|
344
|
+
"name": "Foundation",
|
|
345
|
+
"printedName": "Foundation",
|
|
346
|
+
"declKind": "Import",
|
|
347
|
+
"moduleName": "TNApiGetwaySDK",
|
|
348
|
+
"declAttributes": [
|
|
349
|
+
"RawDocComment"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
342
352
|
{
|
|
343
353
|
"kind": "Import",
|
|
344
354
|
"name": "Foundation",
|
|
@@ -1328,8 +1338,8 @@
|
|
|
1328
1338
|
"filePath": "\/Users\/technonext\/tn\/vcs\/api-gatway-ios-library \/TNApiGetwaySDK\/Config.swift",
|
|
1329
1339
|
"kind": "BooleanLiteral",
|
|
1330
1340
|
"offset": 213,
|
|
1331
|
-
"length":
|
|
1332
|
-
"value": "
|
|
1341
|
+
"length": 5,
|
|
1342
|
+
"value": "false"
|
|
1333
1343
|
},
|
|
1334
1344
|
{
|
|
1335
1345
|
"filePath": "\/Users\/technonext\/tn\/vcs\/api-gatway-ios-library \/TNApiGetwaySDK\/EncryptionCache.swift",
|
|
@@ -339,6 +339,16 @@
|
|
|
339
339
|
}
|
|
340
340
|
]
|
|
341
341
|
},
|
|
342
|
+
{
|
|
343
|
+
"kind": "Import",
|
|
344
|
+
"name": "Foundation",
|
|
345
|
+
"printedName": "Foundation",
|
|
346
|
+
"declKind": "Import",
|
|
347
|
+
"moduleName": "TNApiGetwaySDK",
|
|
348
|
+
"declAttributes": [
|
|
349
|
+
"RawDocComment"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
342
352
|
{
|
|
343
353
|
"kind": "Import",
|
|
344
354
|
"name": "Foundation",
|
|
@@ -1328,8 +1338,8 @@
|
|
|
1328
1338
|
"filePath": "\/Users\/technonext\/tn\/vcs\/api-gatway-ios-library \/TNApiGetwaySDK\/Config.swift",
|
|
1329
1339
|
"kind": "BooleanLiteral",
|
|
1330
1340
|
"offset": 213,
|
|
1331
|
-
"length":
|
|
1332
|
-
"value": "
|
|
1341
|
+
"length": 5,
|
|
1342
|
+
"value": "false"
|
|
1333
1343
|
},
|
|
1334
1344
|
{
|
|
1335
1345
|
"filePath": "\/Users\/technonext\/tn\/vcs\/api-gatway-ios-library \/TNApiGetwaySDK\/EncryptionCache.swift",
|
|
Binary file
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/TNApiGatewayCrypto.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
RKWRtfupzFqmOExlgERAivlwiQk=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/TNApiGetwaySDK.h</key>
|
|
16
16
|
<data>
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
</data>
|
|
19
19
|
<key>Info.plist</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
TFub76JQblJan1RVel6n/0YBvBU=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
OyDT6Ws6I57uUlXutI6+xq3GEUc=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
28
28
|
<data>
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
eKTk6BIJT6aMt+Yu/4cef1Y59IY=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
OyDT6Ws6I57uUlXutI6+xq3GEUc=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
48
48
|
<data>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
xQ7g3ny7NFw/G/7CNyK8GK9nGFQ=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/module.modulemap</key>
|
|
64
64
|
<data>
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
<dict>
|
|
79
79
|
<key>hash2</key>
|
|
80
80
|
<data>
|
|
81
|
-
|
|
81
|
+
PYtMLHutitjnQ+dA7KVHwzaVCHcOI23u5StI1hMHuak=
|
|
82
82
|
</data>
|
|
83
83
|
</dict>
|
|
84
84
|
<key>Headers/TNApiGetwaySDK.h</key>
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<dict>
|
|
93
93
|
<key>hash2</key>
|
|
94
94
|
<data>
|
|
95
|
-
|
|
95
|
+
kRhtERXyvExzeWGowARbA3KOqE6qD2Z4cUjfluMXmwA=
|
|
96
96
|
</data>
|
|
97
97
|
</dict>
|
|
98
98
|
<key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
<dict>
|
|
121
121
|
<key>hash2</key>
|
|
122
122
|
<data>
|
|
123
|
-
|
|
123
|
+
ADvsVBcsw2vVtwf2U1rxn5gHPR++gkGQLaCIG+pNpB4=
|
|
124
124
|
</data>
|
|
125
125
|
</dict>
|
|
126
126
|
<key>Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
127
127
|
<dict>
|
|
128
128
|
<key>hash2</key>
|
|
129
129
|
<data>
|
|
130
|
-
|
|
130
|
+
kRhtERXyvExzeWGowARbA3KOqE6qD2Z4cUjfluMXmwA=
|
|
131
131
|
</data>
|
|
132
132
|
</dict>
|
|
133
133
|
<key>Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
<dict>
|
|
156
156
|
<key>hash2</key>
|
|
157
157
|
<data>
|
|
158
|
-
|
|
158
|
+
ltiKs6rnrXp4y+XzNdOuJct/wWhjF+NNwUBXzhooahU=
|
|
159
159
|
</data>
|
|
160
160
|
</dict>
|
|
161
161
|
<key>Modules/module.modulemap</key>
|