mirror of
https://github.com/status-im/react-native-status-keycard.git
synced 2025-02-28 20:10:28 +00:00
add root address and public key
This commit is contained in:
parent
3febebfba1
commit
d6bac19ca0
@ -309,6 +309,9 @@ public class SmartCard extends BroadcastReceiver implements CardListener {
|
||||
cmdSet.verifyPIN(pin).checkOK();
|
||||
Log.i(TAG, "pin verified");
|
||||
|
||||
byte[] tlvRoot = cmdSet.exportCurrentKey(true).checkOK().getData();
|
||||
BIP32KeyPair keyPair = BIP32KeyPair.fromTLV(tlvRoot);
|
||||
|
||||
byte[] tlv = cmdSet.exportKey(WALLET_PATH, true, true).checkOK().getData();
|
||||
BIP32KeyPair walletKeyPair = BIP32KeyPair.fromTLV(tlv);
|
||||
|
||||
@ -319,6 +322,8 @@ public class SmartCard extends BroadcastReceiver implements CardListener {
|
||||
BIP32KeyPair encryptionKeyPair = BIP32KeyPair.fromTLV(tlv3);
|
||||
|
||||
WritableMap data = Arguments.createMap();
|
||||
data.putString("address", Hex.toHexString(keyPair.toEthereumAddress()));
|
||||
data.putString("public-key", Hex.toHexString(keyPair.getPublicKey()));
|
||||
data.putString("wallet-address", Hex.toHexString(walletKeyPair.toEthereumAddress()));
|
||||
data.putString("whisper-address", Hex.toHexString(whisperKeyPair.toEthereumAddress()));
|
||||
data.putString("whisper-public-key", Hex.toHexString(whisperKeyPair.getPublicKey()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user