Skip to content

Commit

Permalink
feat: decorative changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-sekanina committed May 16, 2023
1 parent 96dd90e commit 2fb0869
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions applet/src/main/java/applet/AppletInstructions.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,17 @@
/**
* Class of applet instructions to make testing and changing instructions easier
* both MainApplet and MyTests are getting instructions from this class
* <p>
* It won't be possible for 'MyTests' class to get instructions from this class at the moment
* the applet is installed on a physical card. The instructions will have to be hard coded into device
* which is going to communicate with the applet.
* <p>
* Still very useful for testing and overseeing I hope.
* <p>
*
* I might consider transforming it to hashtable or more sophisticated data structure later on // this one aged well
*/

public class AppletInstructions {



public AppletInstructions() {
}

public static final short PACKET_BUFFER_SIZE = 250; // amount of data received in one packet


/**
* all data are uploaded with this class at the moment, that will probably change in the future
* when I plan to create different upload class for PSBT transaction and different class for
* applet initialization
*/
public static final short INSTRUCTION_VERSION = 0;

public static final short CLASS_PSBT_UP = 0;

public static final short CLASS_POLICY_UP = 1;
Expand Down Expand Up @@ -66,7 +50,7 @@ public AppletInstructions() {
public static final short INS_FINISH = 2;
public static final short INS_DOWNLOAD_ARRAY = 3;

//applet error throws below
// applet error throws below

/*
public static final short SOME_CRYPTO_ERROR = (short) 0x8444;
Expand All @@ -75,7 +59,7 @@ public AppletInstructions() {
cant do cos (short) 0x6666 != (int) 0x6666...
*/

//global keytype bytes below
// global keytype bytes below
public static final byte PSBT_GLOBAL_UNSIGNED_TX = 0x00; // p2
public static final byte PSBT_GLOBAL_XPUB = 0x01;
public static final byte PSBT_GLOBAL_TX_VERSION = 0x02;
Expand Down

0 comments on commit 2fb0869

Please sign in to comment.