From 9920be1f50edbe4c88fc0cd0c6d93c0f6d2f50eb Mon Sep 17 00:00:00 2001 From: jjos2372 Date: Mon, 18 May 2020 15:00:28 -0300 Subject: [PATCH] Tests --- test.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test.py b/test.py index db1a0ff..64056be 100644 --- a/test.py +++ b/test.py @@ -28,19 +28,19 @@ ret = dongle.exchange(bytearray.fromhex(CLA + INS + P1 + P2 + LEN + DATA)) print("version ", binascii.hexlify(ret)) -# INS = INS_GET_PUBLIC_KEY -# LEN = "03" -# DATA = ACCOUNT + CHANGE + INDEX -# ret = dongle.exchange(bytearray.fromhex(CLA + INS + P1 + P2 + LEN + DATA)) -# print("ret ", str(ret[0])) -# print("publicKey ", binascii.hexlify(ret[1:1+32])) +INS = INS_GET_PUBLIC_KEY +LEN = "03" +DATA = ACCOUNT + CHANGE + INDEX +ret = dongle.exchange(bytearray.fromhex(CLA + INS + P1 + P2 + LEN + DATA)) +print("ret ", str(ret[0])) +print("publicKey ", binascii.hexlify(ret[1:1+32])) -# # Show the address for the given index, blocks for user input (wait for an accept) -# INS = INS_SHOW_ADDRESS -# LEN = "03" -# DATA = ACCOUNT + CHANGE + INDEX -# ret = dongle.exchange(bytearray.fromhex(CLA + INS + P1 + P2 + LEN + DATA)) -# print("ret ", str(ret[0])) +# Show the address for the given index, blocks for user input (wait for an accept) +INS = INS_SHOW_ADDRESS +LEN = "03" +DATA = ACCOUNT + CHANGE + INDEX +ret = dongle.exchange(bytearray.fromhex(CLA + INS + P1 + P2 + LEN + DATA)) +print("ret ", str(ret[0])) # An ordinary payment transaction INS = INS_AUTH_SIGN_TXN