@onekeyfe/react-native-lite-card 1.0.0 → 1.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/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{LoggerManager.kt → lite/LoggerManager.kt} +2 -2
- package/android/src/main/java/so/onekey/app/wallet/{OKLiteManager.kt → lite/OKLiteManager.kt} +8 -8
- package/android/src/main/java/so/onekey/app/wallet/{OKLitePackage.kt → lite/OKLitePackage.kt} +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{keys → lite/keys}/KeysNativeProvider.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{nfc → lite/nfc}/Exceptions.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{nfc → lite/nfc}/NfcUtils.kt +2 -2
- package/android/src/main/java/so/onekey/app/wallet/{nfc → lite/nfc}/broadcast/NfcStatusChangeBroadcastReceiver.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/NfcConstant.kt +2 -2
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/OnekeyLiteCard.kt +9 -9
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/APDUParam.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/CardInfo.java +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/CardResponse.java +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/CardState.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/ParsedCertInfo.java +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/SecureChanelParam.java +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/entitys/SendResponse.kt +2 -2
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/nfc/CommandGenerator.kt +6 -6
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/nfc/Connection.kt +12 -12
- package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/nfc/GPCAPDUGenerator.kt +3 -3
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/EventUtils.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/GpsUtil.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/HexUtils.java +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/LogUtil.kt +3 -3
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/MiUtil.kt +5 -5
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/NfcPermissionUtils.kt +1 -1
- package/android/src/main/java/so/onekey/app/wallet/{utils → lite/utils}/Utils.java +1 -1
- package/ios/GPChannelSDKCore.framework/GPChannelSDKCore +0 -0
- package/ios/GPChannelSDKCore.framework/Headers/GPChannelSDK.h +0 -0
- package/ios/GPChannelSDKCore.framework/Headers/GPChannelSDKCore.h +0 -0
- package/package.json +2 -2
- /package/android/src/main/java/so/onekey/app/wallet/{nfc → lite/nfc}/gpchannel/GPChannelNatives.kt +0 -0
package/android/build.gradle
CHANGED
package/android/src/main/java/so/onekey/app/wallet/{LoggerManager.kt → lite/LoggerManager.kt}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
package so.onekey.app.wallet
|
|
1
|
+
package so.onekey.app.wallet.lite
|
|
2
2
|
|
|
3
3
|
import android.util.Log
|
|
4
4
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
5
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
6
6
|
import com.facebook.react.bridge.ReactMethod
|
|
7
|
-
import so.onekey.app.wallet.utils.sendEvent
|
|
7
|
+
import so.onekey.app.wallet.lite.utils.sendEvent
|
|
8
8
|
|
|
9
9
|
class LoggerManager(private val context: ReactApplicationContext) :
|
|
10
10
|
ReactContextBaseJavaModule(context) {
|
package/android/src/main/java/so/onekey/app/wallet/{OKLiteManager.kt → lite/OKLiteManager.kt}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package so.onekey.app.wallet
|
|
1
|
+
package so.onekey.app.wallet.lite
|
|
2
2
|
|
|
3
3
|
import android.content.Intent
|
|
4
4
|
import android.nfc.NfcAdapter
|
|
@@ -11,13 +11,13 @@ import com.facebook.react.bridge.*
|
|
|
11
11
|
import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
|
|
12
12
|
import kotlinx.coroutines.*
|
|
13
13
|
import kotlinx.coroutines.channels.Channel
|
|
14
|
-
import so.onekey.app.wallet.nfc.NFCExceptions
|
|
15
|
-
import so.onekey.app.wallet.nfc.NfcUtils
|
|
16
|
-
import so.onekey.app.wallet.nfc.broadcast.NfcStatusChangeBroadcastReceiver
|
|
17
|
-
import so.onekey.app.wallet.onekeyLite.OneKeyLiteCard
|
|
18
|
-
import so.onekey.app.wallet.onekeyLite.entitys.CardState
|
|
19
|
-
import so.onekey.app.wallet.utils.NfcPermissionUtils
|
|
20
|
-
import so.onekey.app.wallet.utils.Utils
|
|
14
|
+
import so.onekey.app.wallet.lite.nfc.NFCExceptions
|
|
15
|
+
import so.onekey.app.wallet.lite.nfc.NfcUtils
|
|
16
|
+
import so.onekey.app.wallet.lite.nfc.broadcast.NfcStatusChangeBroadcastReceiver
|
|
17
|
+
import so.onekey.app.wallet.lite.onekeyLite.OneKeyLiteCard
|
|
18
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.CardState
|
|
19
|
+
import so.onekey.app.wallet.lite.utils.NfcPermissionUtils
|
|
20
|
+
import so.onekey.app.wallet.lite.utils.Utils
|
|
21
21
|
import java.util.concurrent.Executors
|
|
22
22
|
import java.util.concurrent.atomic.AtomicInteger
|
|
23
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package so.onekey.app.wallet.nfc
|
|
1
|
+
package so.onekey.app.wallet.lite.nfc
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.app.PendingIntent
|
|
@@ -9,7 +9,7 @@ import android.nfc.NfcAdapter
|
|
|
9
9
|
import android.nfc.tech.*
|
|
10
10
|
import android.os.Build
|
|
11
11
|
import android.provider.Settings
|
|
12
|
-
import so.onekey.app.wallet.utils.MiUtil
|
|
12
|
+
import so.onekey.app.wallet.lite.utils.MiUtil
|
|
13
13
|
|
|
14
14
|
object NfcUtils {
|
|
15
15
|
|
package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/OnekeyLiteCard.kt
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package so.onekey.app.wallet.onekeyLite
|
|
1
|
+
package so.onekey.app.wallet.lite.onekeyLite
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.nfc.tech.IsoDep
|
|
@@ -7,14 +7,14 @@ import androidx.fragment.app.FragmentActivity
|
|
|
7
7
|
import com.google.gson.Gson
|
|
8
8
|
import kotlinx.coroutines.Dispatchers
|
|
9
9
|
import kotlinx.coroutines.withContext
|
|
10
|
-
import so.onekey.app.wallet.nfc.NFCExceptions
|
|
11
|
-
import so.onekey.app.wallet.nfc.NfcUtils
|
|
12
|
-
import so.onekey.app.wallet.onekeyLite.entitys.CardState
|
|
13
|
-
import so.onekey.app.wallet.onekeyLite.nfc.AppleCardType
|
|
14
|
-
import so.onekey.app.wallet.onekeyLite.nfc.Connection
|
|
15
|
-
import so.onekey.app.wallet.onekeyLite.nfc.CommandGenerator
|
|
16
|
-
import so.onekey.app.wallet.utils.LogUtil.printLog
|
|
17
|
-
import so.onekey.app.wallet.utils.NfcPermissionUtils
|
|
10
|
+
import so.onekey.app.wallet.lite.nfc.NFCExceptions
|
|
11
|
+
import so.onekey.app.wallet.lite.nfc.NfcUtils
|
|
12
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.CardState
|
|
13
|
+
import so.onekey.app.wallet.lite.onekeyLite.nfc.AppleCardType
|
|
14
|
+
import so.onekey.app.wallet.lite.onekeyLite.nfc.Connection
|
|
15
|
+
import so.onekey.app.wallet.lite.onekeyLite.nfc.CommandGenerator
|
|
16
|
+
import so.onekey.app.wallet.lite.utils.LogUtil.printLog
|
|
17
|
+
import so.onekey.app.wallet.lite.utils.NfcPermissionUtils
|
|
18
18
|
|
|
19
19
|
object OneKeyLiteCard {
|
|
20
20
|
const val TAG = "OneKeyLiteCard"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
package so.onekey.app.wallet.onekeyLite.nfc
|
|
1
|
+
package so.onekey.app.wallet.lite.onekeyLite.nfc
|
|
2
2
|
|
|
3
3
|
import com.google.gson.JsonObject
|
|
4
4
|
import com.google.gson.JsonParser
|
|
5
5
|
import org.haobtc.onekey.card.gpchannel.GPChannelNatives.nativeGPCParseAPDUResponse
|
|
6
6
|
import org.haobtc.onekey.card.gpchannel.GPChannelNatives.nativeGPCParseSafeAPDUResponse
|
|
7
|
-
import so.onekey.app.wallet.nfc.NFCExceptions
|
|
8
|
-
import so.onekey.app.wallet.onekeyLite.entitys.APDUParam
|
|
9
|
-
import so.onekey.app.wallet.onekeyLite.entitys.CardResponse
|
|
10
|
-
import so.onekey.app.wallet.onekeyLite.entitys.SendResponse
|
|
11
|
-
import so.onekey.app.wallet.utils.Utils
|
|
7
|
+
import so.onekey.app.wallet.lite.nfc.NFCExceptions
|
|
8
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.APDUParam
|
|
9
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.CardResponse
|
|
10
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.SendResponse
|
|
11
|
+
import so.onekey.app.wallet.lite.utils.Utils
|
|
12
12
|
|
|
13
13
|
enum class AppleCardType(val aid: String, val prefixSN: String) {
|
|
14
14
|
V1("D156000132834001", "OKLFT"),
|
package/android/src/main/java/so/onekey/app/wallet/{onekeyLite → lite/onekeyLite}/nfc/Connection.kt
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
package so.onekey.app.wallet.onekeyLite.nfc
|
|
1
|
+
package so.onekey.app.wallet.lite.onekeyLite.nfc
|
|
2
2
|
|
|
3
3
|
import android.nfc.tech.IsoDep
|
|
4
4
|
import org.haobtc.onekey.card.gpchannel.GPChannelNatives
|
|
5
5
|
import org.haobtc.onekey.card.gpchannel.GPChannelNatives.nativeGPCFinalize
|
|
6
|
-
import so.onekey.app.wallet.keys.KeysNativeProvider
|
|
7
|
-
import so.onekey.app.wallet.nfc.NFCExceptions
|
|
8
|
-
import so.onekey.app.wallet.onekeyLite.NfcConstant
|
|
9
|
-
import so.onekey.app.wallet.onekeyLite.entitys.*
|
|
10
|
-
import so.onekey.app.wallet.onekeyLite.nfc.GPCAPDUGenerator.buildGPCAPDU
|
|
11
|
-
import so.onekey.app.wallet.onekeyLite.nfc.GPCAPDUGenerator.combCommand
|
|
12
|
-
import so.onekey.app.wallet.utils.HexUtils
|
|
13
|
-
import so.onekey.app.wallet.utils.HexUtils.byteArr2HexStr
|
|
14
|
-
import so.onekey.app.wallet.utils.HexUtils.hexString2Bytes
|
|
15
|
-
import so.onekey.app.wallet.utils.LogUtil.printLog
|
|
16
|
-
import so.onekey.app.wallet.utils.Utils
|
|
6
|
+
import so.onekey.app.wallet.lite.keys.KeysNativeProvider
|
|
7
|
+
import so.onekey.app.wallet.lite.nfc.NFCExceptions
|
|
8
|
+
import so.onekey.app.wallet.lite.onekeyLite.NfcConstant
|
|
9
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.*
|
|
10
|
+
import so.onekey.app.wallet.lite.onekeyLite.nfc.GPCAPDUGenerator.buildGPCAPDU
|
|
11
|
+
import so.onekey.app.wallet.lite.onekeyLite.nfc.GPCAPDUGenerator.combCommand
|
|
12
|
+
import so.onekey.app.wallet.lite.utils.HexUtils
|
|
13
|
+
import so.onekey.app.wallet.lite.utils.HexUtils.byteArr2HexStr
|
|
14
|
+
import so.onekey.app.wallet.lite.utils.HexUtils.hexString2Bytes
|
|
15
|
+
import so.onekey.app.wallet.lite.utils.LogUtil.printLog
|
|
16
|
+
import so.onekey.app.wallet.lite.utils.Utils
|
|
17
17
|
import java.io.IOException
|
|
18
18
|
|
|
19
19
|
class Connection(val isoDep: IsoDep, private val mCommandGenerator: CommandGenerator) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
package so.onekey.app.wallet.onekeyLite.nfc
|
|
1
|
+
package so.onekey.app.wallet.lite.onekeyLite.nfc
|
|
2
2
|
|
|
3
3
|
import com.google.gson.Gson
|
|
4
4
|
import org.haobtc.onekey.card.gpchannel.GPChannelNatives
|
|
5
|
-
import so.onekey.app.wallet.onekeyLite.entitys.APDUParam
|
|
6
|
-
import so.onekey.app.wallet.utils.LogUtil.printLog
|
|
5
|
+
import so.onekey.app.wallet.lite.onekeyLite.entitys.APDUParam
|
|
6
|
+
import so.onekey.app.wallet.lite.utils.LogUtil.printLog
|
|
7
7
|
|
|
8
8
|
object GPCAPDUGenerator {
|
|
9
9
|
private const val TAG = "GPCAPDUGenerator"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
package so.onekey.app.wallet.utils
|
|
1
|
+
package so.onekey.app.wallet.lite.utils
|
|
2
2
|
|
|
3
|
-
import so.onekey.app.wallet.onekeyLite.NfcConstant
|
|
4
|
-
import so.onekey.app.wallet.LoggerManager
|
|
3
|
+
import so.onekey.app.wallet.lite.onekeyLite.NfcConstant
|
|
4
|
+
import so.onekey.app.wallet.lite.LoggerManager
|
|
5
5
|
|
|
6
6
|
object LogUtil {
|
|
7
7
|
@JvmStatic
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package so.onekey.app.wallet.utils
|
|
1
|
+
package so.onekey.app.wallet.lite.utils
|
|
2
2
|
|
|
3
3
|
import android.app.AppOpsManager
|
|
4
4
|
import android.content.Context
|
|
@@ -9,10 +9,10 @@ import android.provider.Settings
|
|
|
9
9
|
import android.util.Log
|
|
10
10
|
import androidx.annotation.IntDef
|
|
11
11
|
import androidx.annotation.RequiresApi
|
|
12
|
-
import so.onekey.app.wallet.utils.MiUtil.PermissionResult.Companion.PERMISSION_ASK
|
|
13
|
-
import so.onekey.app.wallet.utils.MiUtil.PermissionResult.Companion.PERMISSION_DENIED
|
|
14
|
-
import so.onekey.app.wallet.utils.MiUtil.PermissionResult.Companion.PERMISSION_GRANTED
|
|
15
|
-
import so.onekey.app.wallet.utils.MiUtil.PermissionResult.Companion.PERMISSION_UNKNOWN
|
|
12
|
+
import so.onekey.app.wallet.lite.utils.MiUtil.PermissionResult.Companion.PERMISSION_ASK
|
|
13
|
+
import so.onekey.app.wallet.lite.utils.MiUtil.PermissionResult.Companion.PERMISSION_DENIED
|
|
14
|
+
import so.onekey.app.wallet.lite.utils.MiUtil.PermissionResult.Companion.PERMISSION_GRANTED
|
|
15
|
+
import so.onekey.app.wallet.lite.utils.MiUtil.PermissionResult.Companion.PERMISSION_UNKNOWN
|
|
16
16
|
|
|
17
17
|
object MiUtil {
|
|
18
18
|
val TAG = MiUtil::class.simpleName
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
/package/android/src/main/java/so/onekey/app/wallet/{nfc → lite/nfc}/gpchannel/GPChannelNatives.kt
RENAMED
|
File without changes
|